void Build() { Title = GettextCatalog.GetString("Exception Caught"); DefaultHeight = 500; DefaultWidth = 600; VBox.Spacing = 0; VBox.PackStart(CreateExceptionHeader(), false, true, 0); var paned = new VPaned(); paned.Add1(CreateExceptionValueTreeView()); paned.Add2(CreateStackTraceTreeView()); paned.Show(); var vbox = new VBox(false, 0); vbox.PackStart(CreateSeparator(), false, true, 0); vbox.PackStart(paned, true, true, 0); vbox.PackStart(CreateSeparator(), false, true, 0); vbox.Show(); VBox.PackStart(vbox, true, true, 0); var actionArea = new HBox(false, 12) { BorderWidth = 6 }; OnlyShowMyCodeCheckbox = new CheckButton(GettextCatalog.GetString("_Only show my code.")); OnlyShowMyCodeCheckbox.Toggled += OnlyShowMyCodeToggled; OnlyShowMyCodeCheckbox.Show(); OnlyShowMyCodeCheckbox.Active = DebuggingService.GetUserOptions().ProjectAssembliesOnly; var alignment = new Alignment(0.0f, 0.5f, 0.0f, 0.0f) { Child = OnlyShowMyCodeCheckbox }; alignment.Show(); actionArea.PackStart(alignment, true, true, 0); actionArea.PackStart(CreateButtonBox(), false, true, 0); actionArea.Show(); VBox.PackStart(actionArea, false, true, 0); ActionArea.Hide(); }
void Build () { Title = GettextCatalog.GetString ("Exception Caught"); DefaultHeight = 500; DefaultWidth = 600; VBox.Spacing = 0; VBox.PackStart (CreateExceptionHeader (), false, true, 0); var paned = new VPaned (); paned.Add1 (CreateExceptionValueTreeView ()); paned.Add2 (CreateStackTraceTreeView ()); paned.Show (); var vbox = new VBox (false, 0); vbox.PackStart (CreateSeparator (), false, true, 0); vbox.PackStart (paned, true, true, 0); vbox.PackStart (CreateSeparator (), false, true, 0); vbox.Show (); VBox.PackStart (vbox, true, true, 0); var actionArea = new HBox (false, 12) { BorderWidth = 6 }; OnlyShowMyCodeCheckbox = new CheckButton (GettextCatalog.GetString ("_Only show my code.")); OnlyShowMyCodeCheckbox.Toggled += OnlyShowMyCodeToggled; OnlyShowMyCodeCheckbox.Show (); OnlyShowMyCodeCheckbox.Active = DebuggingService.GetUserOptions ().ProjectAssembliesOnly; var alignment = new Alignment (0.0f, 0.5f, 0.0f, 0.0f) { Child = OnlyShowMyCodeCheckbox }; alignment.Show (); actionArea.PackStart (alignment, true, true, 0); actionArea.PackStart (CreateButtonBox (), false, true, 0); actionArea.Show (); VBox.PackStart (actionArea, false, true, 0); ActionArea.Hide (); }
///<summary> /// InitWindow /// Sets up the widgets and events in the chat window ///</summary> void InitWindow() { hasBeenShown = false; everShown = false; shiftKeyPressed = false; notifyUser = false; // Update the window title Title = string.Format("Chat with {0}", peerPerson.DisplayName); Icon = Utilities.GetIcon("banter-22", 22); this.DefaultSize = new Gdk.Size(400, 700); hpaned = new HPaned(); hpaned.CanFocus = true; hpaned.Position = 300; hpaned.Show(); this.Add(hpaned); leftPaneVBox = new VBox(); leftPaneVBox.NoShowAll = true; leftPaneVBox.Visible = false; hpaned.Add1(leftPaneVBox); rightPaneVBox = new VBox(); rightPaneVBox.BorderWidth = 8; rightPaneVBox.Show(); hpaned.Add2(rightPaneVBox); personControlVBox = new VBox(false, 4); personControlVBox.Show(); rightPaneVBox.PackStart(personControlVBox, false, false, 0); PersonCard card = new PersonCard(peerPerson); card.Size = PersonCardSize.Medium; // Not sure why but we need to call ShowAll on the PersonCard for it to display card.ShowAll(); card.ShowTextChatButton = false; personControlVBox.PackStart(card, true, true, 0); HBox hbox = new HBox(false, 0); hbox.Show(); personControlVBox.PackStart(hbox, false, false, 0); //showPersonDetailsButton = new Button (); //showPersonDetailsButton.CanFocus = true; //showPersonDetailsButton.Label = Catalog.GetString ("Show Contact _Details"); //showPersonDetailsButton.UseUnderline = true; //showPersonDetailsButton.Image = new Image (Stock.GoBack, IconSize.Menu); //showPersonDetailsButton.Show (); //hbox.PackStart (showPersonDetailsButton); videoVBox = new VBox(false, 0); if (this.chatType == ChatType.Video) { ShowVideoControl(true); } else { videoVBox.Visible = false; } rightPaneVBox.PackStart(videoVBox, false, true, 0); audioVBox = new VBox(false, 0); if (this.chatType == ChatType.Audio) { ShowAudioControl(true); } else { audioVBox.Visible = false; } rightPaneVBox.PackStart(audioVBox, false, false, 0); messagesVPaned = new VPaned(); messagesVPaned.CanFocus = true; // This is lame, fix the way this is all calculated if (videoView != null) { messagesVPaned.Position = 100; } else { messagesVPaned.Position = 700; } messagesVPaned.Show(); rightPaneVBox.PackStart(messagesVPaned, true, true, 0); Gtk.ScrolledWindow sw = new ScrolledWindow(); sw.VscrollbarPolicy = PolicyType.Automatic; sw.HscrollbarPolicy = PolicyType.Never; //scrolledWindow.ShadowType = ShadowType.None; sw.BorderWidth = 0; sw.CanFocus = true; sw.Show(); messagesView = new MessagesView(); messagesView.Show(); sw.Add(messagesView); messagesVPaned.Pack1(sw, true, true); typingVBox = new VBox(false, 0); typingVBox.Show(); messagesVPaned.Pack2(typingVBox, false, false); typingToolbar = new Toolbar(); typingToolbar.ShowArrow = false; typingToolbar.ToolbarStyle = ToolbarStyle.Icons; typingToolbar.IconSize = IconSize.SmallToolbar; typingToolbar.Show(); typingVBox.PackStart(typingToolbar, false, false, 0); typingScrolledWindow = new ScrolledWindow(); typingScrolledWindow.VscrollbarPolicy = PolicyType.Automatic; typingScrolledWindow.HscrollbarPolicy = PolicyType.Automatic; typingScrolledWindow.ShadowType = ShadowType.EtchedIn; typingScrolledWindow.CanFocus = true; typingScrolledWindow.Show(); typingVBox.PackStart(typingScrolledWindow, true, true, 0); typingTextView = new TextView(); typingTextView.CanFocus = true; typingTextView.WrapMode = WrapMode.Word; typingTextView.LeftMargin = 4; typingTextView.RightMargin = 4; typingTextView.KeyPressEvent += OnTypingTextViewKeyPressEvent; typingTextView.KeyReleaseEvent += OnTypingTextViewKeyReleaseEvent; typingTextView.Show(); typingScrolledWindow.Add(typingTextView); spell_check = new SpellCheck(typingTextView, "en-us"); Shown += OnWindowShown; DeleteEvent += WindowDeleted; this.FocusInEvent += FocusInEventHandler; }