public DisassemblyView() { ContentName = GettextCatalog.GetString("Disassembly"); sw = new Gtk.ScrolledWindow(); editor = new TextEditor(); editor.Document.ReadOnly = true; editor.Options = new CommonTextEditorOptions { ShowLineNumberMargin = false, }; sw.Add(editor); sw.HscrollbarPolicy = Gtk.PolicyType.Automatic; sw.VscrollbarPolicy = Gtk.PolicyType.Automatic; sw.ShowAll(); sw.Vadjustment.ValueChanged += OnScrollEditor; sw.VScrollbar.ButtonPressEvent += OnPress; sw.VScrollbar.ButtonReleaseEvent += OnRelease; sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask; sw.ShadowType = Gtk.ShadowType.In; sw.Sensitive = false; currentDebugLineMarker = new CurrentDebugLineTextMarker(editor); DebuggingService.StoppedEvent += OnStop; }
public DisassemblyView() { DocumentTitle = GettextCatalog.GetString("Disassembly"); sw = new Gtk.ScrolledWindow(); editor = TextEditorFactory.CreateNewEditor(); editor.IsReadOnly = true; asmMarker = TextMarkerFactory.CreateAsmLineMarker(editor); editor.Options = DefaultSourceEditorOptions.PlainEditor; sw.AddWithViewport(editor); sw.HscrollbarPolicy = Gtk.PolicyType.Automatic; sw.VscrollbarPolicy = Gtk.PolicyType.Automatic; sw.ShowAll(); sw.Vadjustment.ValueChanged += OnScrollEditor; sw.VScrollbar.ButtonPressEvent += OnPress; sw.VScrollbar.ButtonReleaseEvent += OnRelease; sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask; sw.ShadowType = Gtk.ShadowType.In; sw.Sensitive = false; DebuggingService.StoppedEvent += OnStop; }
public static void Load(PreferenceService service) { Page music = ServiceManager.SourceManager.MusicLibrary.PreferencesPage; foreach (LibrarySource source in ServiceManager.SourceManager.FindSources <LibrarySource> ()) { new LibraryLocationButton(source); } PreferenceBase folder_pattern = music["file-system"]["folder_pattern"]; folder_pattern.DisplayWidget = new PatternComboBox(folder_pattern, FileNamePattern.SuggestedFolders); PreferenceBase file_pattern = music["file-system"]["file_pattern"]; file_pattern.DisplayWidget = new PatternComboBox(file_pattern, FileNamePattern.SuggestedFiles); PreferenceBase pattern_display = music["file-system"].FindOrAdd(new VoidPreference("file_folder_pattern")); pattern_display.DisplayWidget = new PatternDisplay(folder_pattern.DisplayWidget, file_pattern.DisplayWidget); // Set up the extensions tab UI Banshee.Addins.Gui.AddinView view = new Banshee.Addins.Gui.AddinView(); view.Show(); Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow(); scroll.HscrollbarPolicy = PolicyType.Never; scroll.AddWithViewport(view); scroll.Show(); service["extensions"].DisplayWidget = scroll; }
public ArtistInfo(InfoBar info_bar) : base(info_bar) { Viewport view = new Viewport (); SearchBox search_box = new SearchBox (); ScrolledWindow scroll = new ScrolledWindow (); box.PackStart (scroll, true, true, 0); box.PackStart (new HSeparator (), false ,false, 0); box.PackStart (search_box, false, true, 0); artist_box.PackStart (artist_header.DisplayWidget, false, false, 0); artist_box.PackStart (content_tabs.DisplayWidget, true, true, 0); artist_box.BorderWidth = 20; content_tabs.AddContent (new SimilarArtists(this), "Similar Artists"); content_tabs.AddContent (new TopTracks(this), "Top Tracks"); content_tabs.AddContent (new TopAlbums(this), "Top Albums"); content_tabs.AddContent (new SimilarTracks()); content_tabs.AddContent (new AlbumDetails(this)); tabs.ShowTabs = false; tabs.ShowBorder = false; tabs.AppendPage (new ArtistInfoHelp (), null); tabs.AppendPage (artist_box, null); scroll.ShadowType = ShadowType.None; scroll.Add (view); view.ShadowType = ShadowType.None; view.Add (tabs); search_box.Search += search; content_tabs.ContentChanged += content_changed; }
public ObjectValuePad () { scrolled = new ScrolledWindow (); scrolled.HscrollbarPolicy = PolicyType.Automatic; scrolled.VscrollbarPolicy = PolicyType.Automatic; tree = new ObjectValueTreeView (); fontChanger = new PadFontChanger (tree, tree.SetCustomFont, tree.QueueResize); tree.AllowEditing = true; tree.AllowAdding = false; tree.HeadersVisible = true; tree.RulesHint = true; scrolled.Add (tree); scrolled.ShowAll (); DebuggingService.CurrentFrameChanged += OnFrameChanged; DebuggingService.PausedEvent += OnDebuggerPaused; DebuggingService.ResumedEvent += OnDebuggerResumed; DebuggingService.StoppedEvent += OnDebuggerStopped; DebuggingService.EvaluationOptionsChanged += OnEvaluationOptionsChanged; needsUpdate = true; //If pad is created/opened while debugging... initialResume = !DebuggingService.IsDebugging; }
static void Main(string [] args) { Application.Init(); if (args.Length <= 0) { Console.WriteLine("\nUSAGE: ImageBrowser.exe <directory>\n"); return; } string dir = args [0]; Gtk.Window window = new Gtk.Window("Image Browser"); Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow(new Adjustment(IntPtr.Zero), new Adjustment(IntPtr.Zero)); ArrayList images = GetItemsFromDirectory(dir); Gtk.Table table = PopulateTable(images); window.Title = String.Format("{0}: {1} ({2} images)", window.Title, dir, images.Count); window.SetDefaultSize(300, 200); window.DeleteEvent += Window_Delete; scroll.AddWithViewport(table); scroll.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); window.Add(scroll); window.ShowAll(); Application.Run(); }
public MultiChooserDialog(IList options, IList banned) { base.Modal = true; base.HeightRequest = 400; base.WidthRequest = 250; //TODO: i18n base.Title = GettextCatalog.GetString ("Choose elements"); base.AddButton(GettextCatalog.GetString ("_Cancel"), Gtk.ResponseType.Cancel); base.AddButton(GettextCatalog.GetString ("_Accept"), Gtk.ResponseType.Accept); base.Response += new Gtk.ResponseHandler(OnResponse); TreeView treeView = new TreeView(); treeView.HeadersVisible = false; _store = new ListStore(typeof(bool), typeof(string)); treeView.Model = _store; CellRendererToggle crtgl = new CellRendererToggle(); crtgl.Activatable = true; crtgl.Toggled += new ToggledHandler(CheckboxToggledHandler); TreeViewColumn column = new TreeViewColumn (); column.PackStart(crtgl, false); column.AddAttribute(crtgl, "active", 0); treeView.AppendColumn(column); CellRendererText crtxt = new CellRendererText (); column = new TreeViewColumn (); column.PackStart(crtxt, false); column.AddAttribute(crtxt, "text", 1); treeView.AppendColumn(column); Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow(); sw.ShadowType = Gtk.ShadowType.In; sw.Add(treeView); treeView.Show(); base.VBox.Add(sw); ShowList(options, banned); sw.Show(); }
private void AppendChat(IChat chat) { Gtk.HBox container = new Gtk.HBox(); Gtk.Label label = new Gtk.Label(chat.Name); container.PackStart(label); Gtk.Button button = new Gtk.Button(new Gtk.Image(Gtk.IconTheme.Default.LookupIcon("gtk-close", 16, Gtk.IconLookupFlags.NoSvg).LoadIcon())); button.Clicked += OnClicked; button.Relief = Gtk.ReliefStyle.None; button.SetSizeRequest(20, 20); container.PackEnd(button); Gtk.TextView view = new Logopathy.Gui.ChatView(chat); ScrolledWindow view_swin = new Gtk.ScrolledWindow(new Gtk.Adjustment(0, 0, 0, 0, 0, 0), new Gtk.Adjustment(0, 0, 0, 0, 0, 0)); view_swin.Add(view); view_swin.SetPolicy(Gtk.PolicyType.Automatic, Gtk.PolicyType.Automatic); hash.Add(container, view); int pos = AppendPage(view_swin, container); container.ShowAll(); ShowAll(); AddedChats.Add(chat); ChatToPage.Add(chat, pos); }
public ObjectWindow(RuntimeThread runtimeThread, object root) : base(GetTitle(root)) { SetDefaultSize(250, 300); SkipPagerHint = true; SkipTaskbarHint = true; scroller = new ScrolledWindow(); scroller.BorderWidth = 5; scroller.ShadowType = ShadowType.In; Add(scroller); store = new TreeStore(typeof(string), typeof(object), typeof(bool)); //TreeModelSort storeSort = new TreeModelSort(store); //storeSort.SetSortColumnId(0, SortType.Ascending); view = new TreeView(store); view.AppendColumn(null, new CellRendererText(), "text", VALUE_TEXT); view.HeadersVisible = false; view.RowExpanded += OnTreeRowExpanded; view.RowCollapsed += OnTreeRowCollapsed; scroller.Add(view); Add(false, new TreeIter(), "", root, false, false); TreeIter first; store.GetIterFirst(out first); view.ExpandRow(store.GetPath(first), false); }
private StatusLogPage() { m_TextView = new TextView(); m_TextView.Editable = false; ScrolledWindow swindow = new ScrolledWindow(); swindow.Add(m_TextView); this.PackStart(swindow, true, true, 0); swindow.ShowAll(); var tag = new TextTag("Error"); tag.Foreground = "darkred"; m_TextView.Buffer.TagTable.Add(tag); tag = new TextTag("Fatal"); tag.Foreground = "darkred"; m_TextView.Buffer.TagTable.Add(tag); tag = new TextTag("Warn"); tag.Foreground = "darkorange"; m_TextView.Buffer.TagTable.Add(tag); tag = new TextTag("Info"); tag.Foreground = "darkgreen"; m_TextView.Buffer.TagTable.Add(tag); tag = new TextTag("Debug"); tag.Foreground = "darkblue"; m_TextView.Buffer.TagTable.Add(tag); m_TextView.Buffer.CreateMark("end", m_TextView.Buffer.EndIter, false); LoggingService.AddLogger(this); }
public HelpTree() : base(GettextCatalog.GetString ("Help"), Gtk.Stock.Help) { tree_view = new TreeView (); tree_view.AppendColumn ("name_col", new CellRendererText (), "text", 0); tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded); tree_view.Selection.Changed += new EventHandler (RowActivated); store = new TreeStore (typeof (string), typeof (Node)); root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), Runtime.Documentation.HelpTree); PopulateNode (root_iter); tree_view.Model = store; tree_view.HeadersVisible = false; scroller = new ScrolledWindow (); scroller.ShadowType = Gtk.ShadowType.In; scroller.Add (tree_view); tree_view.ExpandRow (new TreePath ("0"), false); TreeIter child_iter; start: store.IterChildren (out child_iter, root_iter); do { if (!store.IterHasChild (child_iter)) { store.Remove (ref child_iter); goto start; } } while (store.IterNext (ref child_iter)); Control.ShowAll (); }
private void CreateWidgets() { this.Title = APP_NAME; this.SetDefaultSize(700, 500); this.DeleteEvent += new DeleteEventHandler(OnDeleteEvent); CreateActions(); CreateToolbar(); CreateExprBar(); CreateWebView(); CreateFindbar(); CreateStatusBar(); Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow(); scroll.Add(webview); vbox = new Gtk.VBox(false, 1); vbox.PackStart(toolbar, false, false, 0); vbox.PackStart(exprbar, false, false, 0); vbox.PackStart(scroll); //vbox.PackStart (findbar, false, false, 0); vbox.PackEnd(statusbar, false, true, 0); this.Add(vbox); this.ShowAll(); }
// create the main theatre widget public Theatre() { video_widget = new VideoWidget (true); video_widget_fullscreen = new VideoWidget (false); fullscreen = new Fullscreen (video_widget_fullscreen); media_tree = new TreeView (media_store); media_tree.AppendColumn (null, new CellRendererText (), new TreeCellDataFunc (renderMedia)); media_tree.HeadersVisible = false; ScrolledWindow scrolled_tree = new ScrolledWindow (); scrolled_tree.Add (media_tree); scrolled_tree.ShadowType = ShadowType.In; main_splitter.Add1 (scrolled_tree); main_splitter.Add2 (video_widget); media_tree.RowActivated += tree_activated; video_widget.ButtonPressEvent += video_button_press; video_widget_fullscreen.ButtonPressEvent += video_button_press; video_widget.ButtonReleaseEvent += video_button_release; video_widget_fullscreen.ButtonReleaseEvent += video_button_release; Global.Core.Fuse.MediaControls.MediaEngine.FoundVideoInfo += found_video_info; }
public AddInManagerDialog() { this.BorderWidth = 12; this.Title = GettextCatalog.GetString ("AddInManager"); this.TransientFor = (Window) WorkbenchSingleton.Workbench; this.SetDefaultSize (400, 350); ScrolledWindow sw = new ScrolledWindow (); sw.ShadowType = ShadowType.In; TreeView tv = new TreeView (); tv.Selection.Changed += new EventHandler (OnSelectionChanged); tv.RowActivated += new RowActivatedHandler (OnRowActivated); CellRendererToggle toggle = new CellRendererToggle (); toggle.Toggled += OnCellToggled; tv.AppendColumn (GettextCatalog.GetString ("Enabled"), toggle, "active", 0); tv.AppendColumn (GettextCatalog.GetString ("AddIn Name"), new CellRendererText (), "text", 1); tv.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 2); sw.Add (tv); this.AddButton (Gtk.Stock.Close, ResponseType.Close); LoadAddIns (); tv.Model = store; this.VBox.Add (sw); addinDetails = new AddInDetailsFrame (); this.VBox.Add (addinDetails); this.ShowAll (); }
public DialogError(string message, Exception e, Window parent) : base("Error", parent, DialogFlags.Modal, Stock.Ok, ResponseType.Ok) { HBox hbox = new HBox(); Image icon = new Image(Stock.DialogError,IconSize.Dialog); Label label = new Label(message); Expander exp = new Expander("Details"); ScrolledWindow sw = new ScrolledWindow(); TextView tview = new TextView(); hbox.BorderWidth = 6; hbox.Spacing = 6; label.SetAlignment(0f, 0.5f); exp.BorderWidth = 6; tview.Buffer.Text = e.Message; tview.Buffer.Text += "\n"; tview.Buffer.Text += e.StackTrace; sw.Add(tview); exp.Add(sw); hbox.PackStart(icon, false, false, 0); hbox.PackStart(label, true, true, 0); this.VBox.PackStart(hbox, false, false, 0); this.VBox.PackStart(exp, true, true, 0); this.ShowAll(); }
public static void Main() { BusG.Init (); Application.Init (); tv = new TextView (); ScrolledWindow sw = new ScrolledWindow (); sw.Add (tv); Button btn = new Button ("Click me"); btn.Clicked += OnClick; Button btnq = new Button ("Click me (thread)"); btnq.Clicked += OnClickQuit; VBox vb = new VBox (false, 2); vb.PackStart (sw, true, true, 0); vb.PackStart (btn, false, true, 0); vb.PackStart (btnq, false, true, 0); Window win = new Window ("D-Bus#"); win.SetDefaultSize (640, 480); win.Add (vb); win.Destroyed += delegate {Application.Quit ();}; win.ShowAll (); bus = Bus.Session.GetObject<IBus> ("org.freedesktop.DBus", new ObjectPath ("/org/freedesktop/DBus")); Application.Run (); }
public ViewNameIcon() : base() { upbutton = new Button(); upbutton.Add( new Image(Stock.GoUp, IconSize.Button) ); upbutton.Clicked += OnUpClicked; downbutton = new Button(); downbutton.Add( new Image(Stock.GoDown, IconSize.Button) ); downbutton.Clicked += OnDownClicked; swindow = new ScrolledWindow(); view = new IconView(); CellRendererPixbuf cellicon= new CellRendererPixbuf(); CellRendererText celltext = new CellRendererText(); celltext.Xalign=0.5f; view.PackStart(cellicon, false); view.SetCellDataFunc(cellicon, CellRenderFunctions.RenderIcon); view.PackStart(celltext, false); view.SetCellDataFunc(celltext, CellRenderFunctions.RenderName); view.SelectionMode = Gtk.SelectionMode.Browse; view.SelectionChanged += OnSelectionChanged; view.ItemActivated += OnRowActivated; swindow.Add(view); swindow.HscrollbarPolicy = PolicyType.Never; swindow.VscrollbarPolicy = PolicyType.Automatic; this.PackStart(upbutton, false, false, 0); this.PackStart(swindow, true, true, 0); this.PackStart(downbutton, false, false, 0); store = new StoreBase(); view.Model=store.ViewModel; ShowAll(); }
public static void Main20 (string[] args) { Application.Init (); PopulateStore (); Window win = new Window ("TreeView demo"); win.DeleteEvent += new DeleteEventHandler (DeleteCB); win.DefaultWidth = 320; win.DefaultHeight = 480; ScrolledWindow sw = new ScrolledWindow (); win.Add (sw); TreeView tv = new TreeView (store); tv.HeadersVisible = true; tv.AppendColumn ("One", new CellRendererText (), new TreeCellDataFunc (CellDataA)); tv.AppendColumn ("Two", new CellRendererText (), new TreeCellDataFunc (CellDataB)); sw.Add (tv); win.ShowAll (); Application.Run (); }
public DemoTreeStore () : base ("Card planning sheet") { VBox vbox = new VBox (false, 8); vbox.BorderWidth = 8; Add (vbox); vbox.PackStart (new Label ("Jonathan's Holiday Card Planning Sheet"), false, false, 0); ScrolledWindow sw = new ScrolledWindow (); sw.ShadowType = ShadowType.EtchedIn; sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); vbox.PackStart (sw, true, true, 0); // create model CreateModel (); // create tree view TreeView treeView = new TreeView (store); treeView.RulesHint = true; treeView.Selection.Mode = SelectionMode.Multiple; AddColumns (treeView); sw.Add (treeView); // expand all rows after the treeview widget has been realized treeView.Realized += new EventHandler (ExpandRows); SetDefaultSize (650, 400); ShowAll (); }
public ErrorsSource(string name, Source source) : base(name, 50) { this.source = source; this.source.AddChildSource (this); scrolled_window = new ScrolledWindow(); scrolled_window.ShadowType = ShadowType.In; scrolled_window.VscrollbarPolicy = PolicyType.Automatic; scrolled_window.HscrollbarPolicy = PolicyType.Automatic; view = new TreeView(); scrolled_window.Add(view); scrolled_window.ShowAll(); TreeViewColumn message_col = view.AppendColumn(Catalog.GetString("Message"), new CellRendererText(), "text", 0); TreeViewColumn file_col = view.AppendColumn(Catalog.GetString("File Name"), new CellRendererText(), "text", 1); message_col.Resizable = true; file_col.Resizable = true; store = new ListStore(typeof(string), typeof(string), typeof(Exception)); view.Model = store; }
public static int Main9 (string[] args) { Gtk.Application.Init (); Window win = new Window ("Custom Widget Test"); win.DeleteEvent += new DeleteEventHandler (OnQuit); VPaned paned = new VPaned (); CustomWidget cw = new CustomWidget (); cw.Label = "This one contains a button"; Button button = new Button ("Ordinary button"); cw.Add (button); paned.Pack1 (cw, true, false); cw = new CustomWidget (); cw.Label = "And this one a TextView"; cw.StockId = Stock.JustifyLeft; ScrolledWindow sw = new ScrolledWindow (null, null); sw.ShadowType = ShadowType.In; sw.HscrollbarPolicy = PolicyType.Automatic; sw.VscrollbarPolicy = PolicyType.Automatic; TextView textView = new TextView (); sw.Add (textView); cw.Add (sw); paned.Pack2 (cw, true, false); win.Add (paned); win.ShowAll (); Gtk.Application.Run (); return 0; }
public DropDownBoxListWindow (IListDataProvider provider) : base (WindowType.Popup) { this.DataProvider = provider; this.TransientFor = IdeApp.Workbench.RootWindow; this.TypeHint = Gdk.WindowTypeHint.Menu; this.BorderWidth = 1; this.Events |= Gdk.EventMask.KeyPressMask; list = new ListWidget (this); list.SelectItem += delegate { var sel = list.Selection; if (sel >= 0 && sel < DataProvider.IconCount) { DataProvider.ActivateItem (sel); Destroy (); } }; SetSizeRequest (list.WidthRequest, list.HeightRequest); vScrollbar = new ScrolledWindow (); vScrollbar.VScrollbar.SizeAllocated += (o, args) => { var minWidth = list.WidthRequest + args.Allocation.Width; if (this.Allocation.Width < minWidth) SetSizeRequest (minWidth, list.HeightRequest); }; vScrollbar.Child = list; var vbox = new VBox (); vbox.PackStart (vScrollbar, true, true, 0); Add (vbox); }
public TreeViewDemo () { DateTime start = DateTime.Now; Application.Init (); PopulateStore (); Window win = new Window ("TreeView demo"); win.DeleteEvent += new DeleteEventHandler (DeleteCB); win.SetDefaultSize (640,480); ScrolledWindow sw = new ScrolledWindow (); win.Add (sw); TreeView tv = new TreeView (store); tv.HeadersVisible = true; tv.EnableSearch = false; tv.AppendColumn ("Name", new CellRendererText (), "text", 0); tv.AppendColumn ("Type", new CellRendererText (), "text", 1); sw.Add (tv); dialog.Destroy (); dialog = null; win.ShowAll (); Console.WriteLine (count + " nodes added."); Console.WriteLine ("Startup time: " + DateTime.Now.Subtract (start)); Application.Run (); }
public DisassemblyView () { ContentName = GettextCatalog.GetString ("Disassembly"); sw = new Gtk.ScrolledWindow (); editor = new TextEditor (); editor.Document.ReadOnly = true; editor.Options = new CommonTextEditorOptions { ShowLineNumberMargin = false, }; sw.Add (editor); sw.HscrollbarPolicy = Gtk.PolicyType.Automatic; sw.VscrollbarPolicy = Gtk.PolicyType.Automatic; sw.ShowAll (); sw.Vadjustment.ValueChanged += OnScrollEditor; sw.VScrollbar.ButtonPressEvent += OnPress; sw.VScrollbar.ButtonReleaseEvent += OnRelease; sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask; sw.ShadowType = Gtk.ShadowType.In; sw.Sensitive = false; currentDebugLineMarker = new CurrentDebugLineTextMarker (editor); DebuggingService.StoppedEvent += OnStop; }
private void initGui() { //create the layout VBox layout = new VBox(); //add the list ScrolledWindow sw = new ScrolledWindow(); sw.AddWithViewport( list ); layout.PackStart ( sw ); //add the add/edit/remove buttons HBox hbox = new HBox(); hbox.PackStart ( BtnAdd ); hbox.PackStart ( BtnEdit ); hbox.PackStart ( BtnRemove ); hbox.PackStart ( BtnSort ); layout.PackStart( hbox, false, true, 0 ); //add the checkboxes hbox = new HBox(); hbox.PackStart( ChkOwnerDrawned , true, true, 0 ); hbox.PackStart( ChkIsCheckBoxList, true, true, 0 ); hbox.PackStart( ChkIsEditable , true, true, 0 ); hbox.PackStart( ChkDragAndDrop , true, true, 0 ); // layout.PackStart( hbox, false, true, 0 ); //add layout this.Add( layout ); }
public EntityListView() { SizeRequested += delegate(object o, SizeRequestedArgs args) { if (Child != null) args.Requisition = Child.SizeRequest (); }; SizeAllocated += delegate(object o, SizeAllocatedArgs args) { if (Child != null) Child.Allocation = args.Allocation; }; VBox vBox = new VBox(); ScrolledWindow scrolledWindow = new ScrolledWindow(); scrolledWindow.ShadowType = ShadowType.In; treeView = new TreeView(); scrolledWindow.Add (treeView); vBox.Add (scrolledWindow); Add (vBox); ShowAll (); actionGroup = new ActionGroup("entityListView"); }
public DemoListStore () : base ("ListStore Demo") { BorderWidth = 8; VBox vbox = new VBox (false, 8); Add (vbox); Label label = new Label ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though)."); vbox.PackStart (label, false, false, 0); ScrolledWindow sw = new ScrolledWindow (); sw.ShadowType = ShadowType.EtchedIn; sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); vbox.PackStart (sw, true, true, 0); // create model store = CreateModel (); // create tree view TreeView treeView = new TreeView (store); treeView.RulesHint = true; treeView.SearchColumn = (int) Column.Description; sw.Add (treeView); AddColumns (treeView); // finish & show SetDefaultSize (280, 250); ShowAll (); }
public DemoTextView () : base ("TextView") { SetDefaultSize (450,450); BorderWidth = 0; VPaned vpaned = new VPaned (); vpaned.BorderWidth = 5; Add (vpaned); // For convenience, we just use the autocreated buffer from // the first text view; you could also create the buffer // by itself, then later create a view widget. view1 = new TextView (); TextBuffer buffer = view1.Buffer; view2 = new TextView (buffer); ScrolledWindow sw = new ScrolledWindow (); sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); vpaned.Add1 (sw); sw.Add (view1); sw = new ScrolledWindow (); sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); vpaned.Add2 (sw); sw.Add (view2); CreateTags (buffer); InsertText (buffer); AttachWidgets (view1); AttachWidgets (view2); ShowAll (); }
private void BuildView () { VBox box = new VBox (); Add (box); ScrolledWindow sw = new ScrolledWindow (); sw.HscrollbarPolicy = PolicyType.Never; TreeView view = new TreeView (); view.RowActivated += delegate (object o, RowActivatedArgs args) { TreeIter iter; if (store.GetIter (out iter, args.Path)) { Type type = (Type)store.GetValue (iter, 1); Window window = (Window)Activator.CreateInstance (type); window.WindowPosition = WindowPosition.Center; window.DeleteEvent += delegate { window.Destroy (); }; window.Show (); } }; view.Model = store; view.AppendColumn ("Module", new CellRendererText (), "text", 0); sw.Add (view); box.PackStart (sw, true, true, 0); sw.ShowAll (); Button button = new Button (Stock.Quit); button.Clicked += delegate { Destroy (); Application.Quit (); }; box.PackStart (button, false, false, 0); box.ShowAll (); }
public TreeViewDemo() { Application.Init (); PopulateStore (); Window win = new Window ("TreeView demo"); win.DeleteEvent += new DeleteEventHandler (DeleteCB); win.SetDefaultSize (640,480); ScrolledWindow sw = new ScrolledWindow (); win.Add (sw); TreeView tv = new TreeView (store); tv.EnableSearch = true; tv.HeadersVisible = true; tv.HeadersClickable = true; tv.AppendColumn ("Name", new CellRendererText (), "text", 0); tv.AppendColumn ("Type", new CellRendererText (), "text", 1); sw.Add (tv); dialog.Destroy (); dialog = null; win.ShowAll (); Application.Run (); }
public HelpTree () : base (GettextCatalog.GetString ("Help"), Gtk.Stock.Help) { tree_view = new MonoDevelop.Ide.Gui.Components.PadTreeView (); tree_view.AppendColumn ("name_col", tree_view.TextRenderer, "text", 0); tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded); tree_view.Selection.Changed += new EventHandler (RowActivated); store = new TreeStore (typeof (string), typeof (Node)); tree_view.Model = store; tree_view.HeadersVisible = false; scroller = new MonoDevelop.Components.CompactScrolledWindow (); scroller.ShadowType = Gtk.ShadowType.None; scroller.Add (tree_view); if (HelpService.HelpTree != null) { root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), HelpService.HelpTree); PopulateNode (root_iter); tree_view.ExpandRow (new TreePath ("0"), false); TreeIter child_iter; start: if (store.IterChildren (out child_iter, root_iter)) { do { if (!store.IterHasChild (child_iter)) { store.Remove (ref child_iter); goto start; } } while (store.IterNext (ref child_iter)); } } Control.ShowAll (); }
private void build() { this.Modal = true; this.HeightRequest = 400; this.WidthRequest = 600; this.Title = "Battle Preferences"; this.IconName = Stock.Preferences; this.vb1 = new VBox(true, 1); this.sw1 = new ScrolledWindow(); this.generalExp = new Expander("General Options"); this.generalExp.Add(new Label("Print some options description here")); this.sourcesExp = new Expander("Sources"); this.generationExp = new Expander("Generation Options"); this.printExp = new Expander("Print Options"); this.reportExp = new Expander("Report Options"); this.vb1.PackStart(generalExp, false, true, 1); this.vb1.PackStart(sourcesExp, false, true, 1); this.vb1.PackStart(generationExp, false, true, 1); this.vb1.PackStart(printExp, false, true, 1); this.vb1.PackStart(reportExp, false, true, 1); this.sw1.Add(this.vb1); this.cancelBtn = new Button("Cancel"); this.applyBtn = new Button("Apply"); this.saveBtn = new Button("Save"); this.cancelBtn.Image = new Image(Stock.Cancel, Gtk.IconSize.Button); this.applyBtn.Image = new Image(Stock.Apply, Gtk.IconSize.Button); this.saveBtn.Image = new Image(Stock.Save, IconSize.Button); this.ActionArea.PackStart(cancelBtn, false, false, 1); this.ActionArea.PackStart(applyBtn, false, false, 1); this.ActionArea.PackEnd(saveBtn, false, false, 1); this.VBox.PackStart(this.sw1, true, true, 1); this.ShowAll(); }
public Gtk.Widget GetVisualizerWidget(ObjectValue val) { VBox box = new VBox(false, 6); textView = new TextView(); textView.Buffer.Text = val.GetRawValue() as string; textView.WrapMode = WrapMode.Char; Gtk.ScrolledWindow scrolled = new Gtk.ScrolledWindow(); scrolled.HscrollbarPolicy = PolicyType.Automatic; scrolled.VscrollbarPolicy = PolicyType.Automatic; scrolled.ShadowType = ShadowType.In; scrolled.Add(textView); box.PackStart(scrolled, true, true, 0); CheckButton cb = new CheckButton(GettextCatalog.GetString("Wrap text")); cb.Active = true; cb.Toggled += delegate { if (cb.Active) { textView.WrapMode = WrapMode.Char; } else { textView.WrapMode = WrapMode.None; } }; box.PackStart(cb, false, false, 0); box.ShowAll(); return(box); }
public UITabPage (GameConfigDB gameConfigDB , Gtk.ScrolledWindow scrolledWindow , Gtk.Viewport viewport , Gtk.Label label , Gtk.Fixed canvas) { _scrolledWindow = scrolledWindow; _viewport = viewport; _label = label; _canvas = canvas; _canvas.ScrollEvent += OnScrollEvent; _scrolledWindow.ButtonPressEvent += OnMainWindowButtonPressed; _label.Parent.ButtonPressEvent += OnTabButtonPressed; _gameConfigDB = gameConfigDB; _uiSections = new List <UISection>(); Point currentSectionPoint = UISection.DEFAULT_ORIGIN_POINT; foreach (GameConfigSectionDescriptor sectionDescriptor in _gameConfigDB.GetSections()) { UISection newSection = new UISection(this, sectionDescriptor, currentSectionPoint); currentSectionPoint = newSection.GetNextPosition(); _uiSections.Add(newSection); } ResizeCanvas(); }
public DemoApplicationWindow () : base ("Application Window") { SetDefaultSize (200, 200); vbox = new VBox (false, 0); Add (vbox); AddActions (); statusbar = new Statusbar (); UpdateStatus (); vbox.PackEnd (statusbar, false, false, 0); ScrolledWindow sw = new ScrolledWindow (); sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); sw.ShadowType = ShadowType.In; vbox.PackEnd (sw, true, true, 0); TextView textview = new TextView (); textview.Buffer.MarkSet += new MarkSetHandler (MarkSet); sw.Add (textview); textview.GrabFocus (); ShowAll (); }
public GrammarWindow(RuntimeThread runtimeThread) : base("Grammar") { runtimeThread.Runtime.Grammar.Trace.PatternDefinedEvent += OnGrammarPatternDefined; runtimeThread.Runtime.Grammar.Trace.PatternChangedEvent += OnGrammarPatternChanged; SetDefaultSize(250, 300); SkipPagerHint = true; SkipTaskbarHint = true; scroller = new ScrolledWindow(); scroller.BorderWidth = 5; scroller.ShadowType = ShadowType.In; Add(scroller); store = new TreeStore(typeof(string), typeof(Source)); // FIXME - only want to sort top level //TreeModelSort storeSort = new TreeModelSort(store); //storeSort.SetSortColumnId(0, SortType.Ascending); view = new TreeView(store); view.AppendColumn(null, new CellRendererText(), "text", VALUE_TEXT); view.HeadersVisible = false; view.RowActivated += OnTreeRowActivated; view.ButtonPressEvent += OnTreeButtonPress; scroller.Add(view); MenuBuilder menuBuilder = new MenuBuilder(); menu = menuBuilder.StartMenu(); menuBuilder.Add("Show source", OnMenuShowSource); menuBuilder.Add("Show object", OnMenuShowObject); menu.ShowAll(); }
public windowTerminalGTK(clsHost host) : base(String.Format("{0} - {1}:{2}",host.Name,host.RemoteHost,host.RemoteSSHPort)) { SSH = new clsSSHTerminal(host); Host = host; ScrolledWindow scrolledWindow = new ScrolledWindow(); textview1 = new TextView(); this.SetSizeRequest(800,600); scrolledWindow.Add(textview1); textview1.ModifyFont(FontDescription.FromString(host.TerminalFont)); this.Add(scrolledWindow); this.CanFocus = true; ShowAll (); SSH.TerminalData += (string text) => { Gtk.Application.Invoke (delegate { TextIter mIter = textview1.Buffer.EndIter; textview1.Buffer.Insert(ref mIter, text); textview1.ScrollToIter(textview1.Buffer.EndIter, 0, false, 0, 0); }); }; }
public MainWindow() : base(Gtk.WindowType.Toplevel) { var webView = new WebKit.WebView(); var scrolled = new ScrolledWindow(); var v = new VPaned(); scrolled.Add(webView); v.Pack1(scrolled, true, true); scrolled.SetSizeRequest(-1, 50); var button = new Button("foo"); v.Pack2(button, true, true); this.Add(v); this.ShowAll(); webView.LoadString("<p>foo</p>", "text/html", "utf-8", null); // This won't show up until we've returned from the constructor // so let's do something easy that can happen after the window shows button.Clicked += (object sender, EventArgs e) => { var document = webView.DomDocument; var first = document.FirstChild; var body = document.GetElementsByTagName("body").Item(0); var para = document.CreateElement("p"); para.AppendChild(document.CreateTextNode("this is some text")); body.AppendChild(para); }; }
private void build() { this.vbox1 = new VBox(); this.toolbar1 = new Toolbar(); this.aboutbtn1 = new ToolButton(Stock.About); this.aboutbtn1.Label = "About"; this.aboutbtn1.IsImportant = true; this.toolbar1.ToolbarStyle = ToolbarStyle.BothHoriz; this.toolbar1.Add(this.aboutbtn1); this.vbox1.PackStart(this.toolbar1, false, true, 0); this.treestore1 = this.populateTreeStoreFromSession(); this.scrollw1 = new ScrolledWindow(); this.hpaned1 = new HPaned(); this.treeview1 = new TreeView(this.treestore1); this.treeview1.HeadersVisible = true; this.treeview1.AppendColumn("Session", new CellRendererText(), "text", 0); this.treeview1.AppendColumn("Name", new CellRendererText(), "text", 1); this.treeview1.ExpandAll(); this.scrollw1.Add(this.treeview1); this.iconview1 = new IconView(); this.hpaned1.Add1(this.scrollw1); this.hpaned1.Add2(this.iconview1); this.hpaned1.Position = 254; this.vbox1.PackStart(this.hpaned1, true, true, 0); this.statusbar1 = new Statusbar(); this.vbox1.PackEnd(this.statusbar1, false, true, 0); this.Add(this.vbox1); this.SetSizeRequest(800,600); this.DeleteEvent += HandleDeleteEvent; }
protected void SetupFilterView <V> (V filter_view) where V : Widget, IListView { ScrolledWindow window = SetupView(filter_view); filter_scrolled_windows.Add(window); filter_view.HeaderVisible = false; filter_view.SelectionProxy.Changed += OnBrowserViewSelectionChanged; }
private void BuildContents() { VBox box = new VBox(); box.BorderWidth = 8; box.Spacing = 10; box.Show(); header_label.Xalign = 0.0f; header_label.Show(); description_label.Show(); normal_controls_table.Show(); advanced_controls_table.Show(); advanced_expander.Add(advanced_controls_table); advanced_expander.Show(); box.PackStart(header_label, false, false, 0); box.PackStart(description_label, false, false, 0); box.PackStart(normal_controls_table, false, false, 5); box.PackStart(advanced_expander, false, false, 0); if (sexpr_results != null) { ScrolledWindow scroll = new Gtk.ScrolledWindow(); scroll.HscrollbarPolicy = PolicyType.Automatic; scroll.VscrollbarPolicy = PolicyType.Automatic; scroll.ShadowType = ShadowType.In; sexpr_results.WrapMode = WrapMode.Word; sexpr_results.SetSizeRequest(-1, 100); scroll.Add(sexpr_results); scroll.ShowAll(); VSeparator sep = new VSeparator(); sep.Show(); Label label = new Label(); label.Markup = "<b>S-Expr Results</b>"; label.Xalign = 0.0f; label.Show(); box.PackStart(sep, false, false, 0); box.PackStart(label, false, false, 0); box.PackStart(scroll, false, false, 0); } VBox.PackStart(box, false, false, 0); SetSizeRequest(350, -1); Gdk.Geometry limits = new Gdk.Geometry(); limits.MinWidth = SizeRequest().Width; limits.MaxWidth = Gdk.Screen.Default.Width; limits.MinHeight = -1; limits.MaxHeight = -1; SetGeometryHints(this, limits, Gdk.WindowHints.MaxSize | Gdk.WindowHints.MinSize); }
public TableViewBackend() { var sw = new Gtk.ScrolledWindow(); sw.ShadowType = Gtk.ShadowType.In; sw.Child = new CustomTreeView(this); sw.Child.Show(); sw.Show(); base.Widget = sw; }
public Gtk.Widget GetVisualizerWidget(ObjectValue val) { VBox box = new VBox(false, 6); textView = new TextView() { WrapMode = WrapMode.Char }; Gtk.ScrolledWindow scrolled = new Gtk.ScrolledWindow(); scrolled.HscrollbarPolicy = PolicyType.Automatic; scrolled.VscrollbarPolicy = PolicyType.Automatic; scrolled.ShadowType = ShadowType.In; scrolled.Add(textView); box.PackStart(scrolled, true, true, 0); CheckButton cb = new CheckButton(GettextCatalog.GetString("Wrap text")); cb.Active = true; cb.Toggled += delegate { if (cb.Active) { textView.WrapMode = WrapMode.Char; } else { textView.WrapMode = WrapMode.None; } }; box.PackStart(cb, false, false, 0); box.ShowAll(); EvaluationOptions ops = DebuggingService.DebuggerSession.EvaluationOptions.Clone(); ops.ChunkRawStrings = true; this.raw = val.GetRawValue(ops) as RawValueString; this.length = raw.Length; this.offset = 0; this.val = val; if (this.length > 0) { idle_id = GLib.Idle.Add(GetNextStringChunk); textView.Destroyed += delegate { if (idle_id != 0) { GLib.Source.Remove(idle_id); idle_id = 0; } }; } return(box); }
/// <summary>Crea el editor para mostrar los errores producidos /// al ensamblar el código en ensamblador.</summary> /// <returns>Un widget con el campo de texto para mostrar /// los errores y advertencias del ensamblador.</returns> private Gtk.Widget CrearErroresEnsamblador() { textoErrores = new Gtk.TextBuffer((Gtk.TextTagTable)null); Gtk.TextView view = new Gtk.TextView(textoErrores); view.Editable = false; Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow(); sw.Add(view); return(sw); }
public RecommendationPane(ContextPage contextPage) : base() { this.context_page = contextPage; main_box = this; main_box.BorderWidth = 5; artist_box = new TitledList(Catalog.GetString("Recommended Artists")); artist_box.ShowAll(); similar_artists_view = new TileView(2); similar_artists_view_sw = new Gtk.ScrolledWindow(); similar_artists_view_sw.SetPolicy(PolicyType.Never, PolicyType.Automatic); similar_artists_view_sw.Add(similar_artists_view); similar_artists_view_sw.ShowAll(); artist_box.PackStart(similar_artists_view_sw, true, true, 0); album_box = new TitledList(null); album_box.TitleWidthChars = 25; album_box.SizeAllocated += OnSideSizeAllocated; album_list = new VBox(); album_box.PackStart(album_list, false, false, 0); track_box = new TitledList(null); track_box.SizeAllocated += OnSideSizeAllocated; track_box.TitleWidthChars = 25; track_list = new VBox(); track_box.PackStart(track_list, true, true, 0); no_artists_pane = new MessagePane(); no_artists_pane.NoShowAll = true; no_artists_pane.Visible = false; string no_results_message; if (!ApplicationContext.Debugging) { no_artists_pane.HeaderIcon = IconThemeUtils.LoadIcon(48, "face-sad", Stock.DialogError); no_results_message = Catalog.GetString("No similar artists found"); } else { no_artists_pane.HeaderIcon = Gdk.Pixbuf.LoadFromResource("no-results.png"); no_results_message = "No one likes your music, fool!"; } no_artists_pane.HeaderMarkup = String.Format("<big><b>{0}</b></big>", GLib.Markup.EscapeText(no_results_message)); artist_box.PackEnd(no_artists_pane, true, true, 0); main_box.PackStart(artist_box, true, true, 5); main_box.PackStart(new VSeparator(), false, false, 0); main_box.PackStart(album_box, false, false, 5); main_box.PackStart(new VSeparator(), false, false, 0); main_box.PackStart(track_box, false, false, 5); no_artists_pane.Hide(); }
/// <summary>Crea el editor para el código en ensamblador.</summary> /// <returns>Un widget que contiene el campo de texto para /// editar código ensamblador.</returns> private Gtk.Widget CrearEditorEnsamblador() { textoCodigo = new Gtk.TextBuffer((Gtk.TextTagTable)null); Gtk.TextView view = new Gtk.TextView(textoCodigo); Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow(); sw.Add(view); textoCodigo.MarkSet += new Gtk.MarkSetHandler(ActualizadaPosicionCursor); return(sw); }
public CS_PlayListAdmin(CS_PlayListsView plsview, CS_PlayListsModel mdl, CS_PlayListCollection cl) { _col = cl; _model = mdl; Gtk.HBox hb = new Gtk.HBox(); Gtk.Button _add = new Gtk.Button(Gtk.Stock.Add); _add.Clicked += delegate(object sender, EventArgs args) { OnAddPls(); }; Gtk.Button _remove = new Gtk.Button(Gtk.Stock.Remove); _remove.Clicked += delegate(object sender, EventArgs args) { OnRemovePls(); }; hb.PackStart(_add); hb.PackStart(_remove); plsscroll = new Gtk.ScrolledWindow(); plsscroll.Add(plsview); _pls = null; _pls_name = new Gtk.Entry(); _pls_model = new CS_PlayListModel(); _pls_view = new CS_PlayListView(); _pls_view.SetModel(_pls_model); plscroll = new Gtk.ScrolledWindow(); plscroll.Add(_pls_view); _pls_view.DragEnd += delegate(object sender, DragEndArgs args) { Console.WriteLine(args); }; Gtk.VBox plsvbox = new Gtk.VBox(); plsvbox.PackStart(_pls_name, false, false, 2); plsvbox.PackEnd(plscroll); Gtk.VPaned vpn = new Gtk.VPaned(); vpn.Add1(plsscroll); vpn.Add2(plsvbox); base.PackStart(hb, false, false, 2); base.PackEnd(vpn); base.ShowAll(); mdl.SetListener(delegate(CS_PlayList pls) { _pls = pls; _pls_model.SetPlayList(_pls); _pls_name.Text = _pls.PlsName; }); }
public static void SetOverlayScrollbarPolicy(Gtk.ScrolledWindow sw, Gtk.PolicyType hpolicy, Gtk.PolicyType vpolicy) { if (!canSetOverlayScrollbarPolicy) { return; } try { gtk_scrolled_window_set_overlay_policy(sw.Handle, hpolicy, vpolicy); return; } catch (DllNotFoundException) { } catch (EntryPointNotFoundException) { } }
void ScrolledWindowSizeRequested(object obj, SizeRequestedArgs args) { Gtk.Requisition req = list.SizeRequest(); if (req.Width <= 0) { return; } Gtk.ScrolledWindow scwin = ((Gtk.ScrolledWindow)obj); scwin.SizeRequested -= ScrolledWindowSizeRequested; scwin.SetSizeRequest(req.Width, req.Width * 2 / 3); ActionArea.BorderWidth = 0; // has to happen post-realize }
private void Layout(bool top) { //Hyena.Log.Information ("ListBrowser LayoutLeft"); Reset(); SchemaEntry <int> current_entry = top ? pane_top_position : pane_left_position; container = GetPane(!top); Paned filter_box = GetPane(top); filter_box.PositionSet = true; Paned current_pane = filter_box; for (int i = 0; i < filter_scrolled_windows.Count; i++) { ScrolledWindow window = filter_scrolled_windows[i]; bool last_even_filter = (i == filter_scrolled_windows.Count - 1 && filter_scrolled_windows.Count % 2 == 0); if (i > 0 && !last_even_filter) { Paned new_pane = GetPane(top); current_pane.Pack2(new_pane, true, false); current_pane.Position = top ? 180 : 350; PersistentPaneController.Control(current_pane, ControllerName(top, i)); current_pane = new_pane; } if (last_even_filter) { current_pane.Pack2(window, true, false); current_pane.Position = top ? 180 : 350; PersistentPaneController.Control(current_pane, ControllerName(top, i)); } else { current_pane.Pack1(window, false, false); } } container.Pack1(filter_box, false, false); container.Pack2(main_scrolled_window, true, false); browser_container = filter_box; if (current_entry.Equals(SchemaEntry <int> .Zero)) { throw new InvalidOperationException(String.Format("No SchemaEntry found for {0} position of {1}", top ? "top" : "left", this.GetType().FullName)); } container.Position = current_entry.DefaultValue; PersistentPaneController.Control(container, current_entry); ShowPack(); }
private void InitializeComponent() { this.Title = "Search Errors"; this.Modal = false; this.WindowPosition = Gtk.WindowPosition.CenterOnParent; this.Resizable = true; this.SetDefaultSize(480, 320); this.IconName = Stock.DialogError; this.AddButton(Stock.Close, Gtk.ResponseType.Close); Gtk.Frame treeFrame = new Gtk.Frame(); treeFrame.Shadow = ShadowType.In; Gtk.ScrolledWindow treeWin = new Gtk.ScrolledWindow(); tvErrors = new Gtk.TreeView (); tvErrors.SetSizeRequest(480,200); tvErrors.Selection.Mode = SelectionMode.Single; tvErrors.AppendColumn(CreateTreeViewColumn("Name", 60, 0)); tvErrors.AppendColumn(CreateTreeViewColumn("Located In", 200, 1)); lsErrors = new Gtk.ListStore(typeof (string), typeof (string), typeof(string)); tvErrors.Model = lsErrors; tvErrors.Selection.Changed += new EventHandler(tvErrors_Selection_Changed); treeWin.Add(tvErrors); treeFrame.BorderWidth = 0; treeFrame.Add(treeWin); for (int i=0; i< alErrors.Count; i++) { MessageEventArgs args = (MessageEventArgs)alErrors[i]; if (args.ErrorFile == null) lsErrors.AppendValues("General Error", string.Empty, args.Message); else lsErrors.AppendValues(args.ErrorFile.Name, args.ErrorFile.DirectoryName, args.Message); } Gtk.Frame txtFrame = new Gtk.Frame(); txtFrame.Shadow = ShadowType.In; Gtk.ScrolledWindow txtScrollWin = new Gtk.ScrolledWindow(); txtErrorDetails = new TextView(); txtErrorDetails.WrapMode = Gtk.WrapMode.WordChar; txtErrorDetails.Editable = false; txtScrollWin.Add(txtErrorDetails); txtFrame.BorderWidth = 0; txtFrame.Add(txtScrollWin); this.VBox.PackStart(treeFrame, true, true, 3); this.VBox.PackEnd(txtFrame, true, true, 3); this.VBox.ShowAll(); }
public void Build() { this.window = new Window("BattleNames"); this.window.SetDefaultSize(800, 600); this.window.DeleteEvent += HandleWindowDeleteEvent; this.vbox = new VBox(); { this.tbar = new Toolbar(); this.tbar.ToolbarStyle = ToolbarStyle.BothHoriz; { this.generatebutton = new ToolButton(Stock.New); this.generatebutton.TooltipText = "Generate a new battle name"; this.generatebutton.Label = "Generate"; this.generatebutton.IsImportant = true; this.generatebutton.Clicked += HandleGeneratebuttonClicked; this.clearbutton = new ToolButton(Stock.Clear); this.clearbutton.TooltipText = "Clear output"; this.clearbutton.Label = "Clear"; this.clearbutton.Clicked += HandleClearbuttonClicked; } this.tbar.Add(this.generatebutton); this.tbar.Add(this.clearbutton); this.hpaned = new HPaned(); { this.treescrolledwindow = new ScrolledWindow(); this.treeview = new TreeView(); this.treeview.AppendColumn("Name", new CellRendererText(), "text", 0); this.treeview.HeadersVisible = true; this.treeview.Model = this.treestore; this.treescrolledwindow.Add(this.treeview); this.textscrolledwindow = new ScrolledWindow(); this.textview = new TextView(); this.textview.Editable = false; this.textscrolledwindow.Add(this.textview); } this.hpaned.Pack1(this.treescrolledwindow, false, true); this.hpaned.Pack2(this.textscrolledwindow, true, true); this.hpaned.Position = 200; this.sbar = new Statusbar(); } this.vbox.PackStart(this.tbar, false, true, 0); this.vbox.PackStart(this.hpaned, true, true, 0); this.vbox.PackEnd(this.sbar, false, true, 0); this.window.Add(this.vbox); }
public View(ProblemModel model) { var view = new ProblemListView(model); var sw = new Gtk.ScrolledWindow() { ShadowType = ShadowType.None, BorderWidth = 0 }; sw.Add(view); Add(sw); ShowAll(); }
void IOutlinedDocument.ReleaseOutlineWidget() { if (outlineTreeView == null) { return; } Gtk.ScrolledWindow w = (Gtk.ScrolledWindow)outlineTreeView.Parent; w.Destroy(); outlineTreeView.Destroy(); outlineTreeStore.Dispose(); outlineTreeStore = null; outlineTreeView = null; }
// ============================================ // PUBLIC Constructors // ============================================ public TalkFrame(UserInfo userInfo) { // Initialize User Info this.userInfo = userInfo; // VPaned Position this.Position = 120; Gtk.Frame frame; // Output Text View this.talkView = new TalkView(); // Output Scrolled Window this.scrolledWindowOut = new Gtk.ScrolledWindow(null, null); this.scrolledWindowOut.ShadowType = Gtk.ShadowType.None; this.scrolledWindowOut.HscrollbarPolicy = Gtk.PolicyType.Automatic; this.scrolledWindowOut.VscrollbarPolicy = Gtk.PolicyType.Automatic; this.scrolledWindowOut.Add(this.talkView); // Output Frame frame = new Gtk.Frame(); frame.Shadow = ShadowType.EtchedOut; frame.ShadowType = ShadowType.EtchedOut; frame.Add(this.scrolledWindowOut); this.Add1(frame); // Input Text View this.inputView = new Gtk.TextView(); this.inputView.HeightRequest = 25; this.inputView.KeyReleaseEvent += new KeyReleaseEventHandler(OnKeyReleaseEvent); // Input Scrolled Window this.scrolledWindowIn = new Gtk.ScrolledWindow(null, null); this.scrolledWindowIn.ShadowType = Gtk.ShadowType.None; this.scrolledWindowIn.HscrollbarPolicy = Gtk.PolicyType.Automatic; this.scrolledWindowIn.VscrollbarPolicy = Gtk.PolicyType.Automatic; this.scrolledWindowIn.Add(this.inputView); // Input Frame frame = new Gtk.Frame(); frame.Shadow = ShadowType.EtchedOut; frame.ShadowType = ShadowType.EtchedOut; frame.Add(this.scrolledWindowIn); this.Add2(frame); // Show All this.ShowAll(); }
public static void GetOverlayScrollbarPolicy(Gtk.ScrolledWindow sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy) { if (!canSetOverlayScrollbarPolicy) { hpolicy = vpolicy = 0; return; } try { gtk_scrolled_window_get_overlay_policy(sw.Handle, out hpolicy, out vpolicy); return; } catch (DllNotFoundException) { } catch (EntryPointNotFoundException) { } hpolicy = vpolicy = 0; canSetOverlayScrollbarPolicy = false; }
void IOutlinedDocument.ReleaseOutlineWidget() { if (outlineView != null) { Gtk.ScrolledWindow w = (Gtk.ScrolledWindow)outlineView.Parent; w.Destroy(); outlineView.Destroy(); outlineView = null; } if (outlineStore != null) { outlineStore.Dispose(); outlineStore = null; } }
public SearchView(SearchSource source) { this.source = source; list_view = new ResultListView(); var controller = new PersistentColumnController("InternetArchive"); list_view.ColumnController = controller; AddColumns(); controller.Load(); list_view.RowActivated += (o, a) => { ServiceManager.Get <InterfaceActionService> ()["InternetArchive.ViewItemDetails"].Activate(); }; list_view.SetModel(source.Model); // Packing var sw = new Gtk.ScrolledWindow(); sw.Child = list_view; var last_hid_more = DateTime.MinValue; string more_text = Catalog.GetString("Fetch more results from the Internet Archive?"); list_view.Vadjustment.ValueChanged += (o, a) => { var adj = list_view.Vadjustment; if ((DateTime.Now - last_hid_more).TotalSeconds > 2 && adj.Value >= adj.Upper - adj.PageSize) { if (source.TotalResults > source.Model.Count) { source.SetStatus(more_text, true, false, "gtk-question"); source.CurrentMessage.AddAction(new MessageAction(Catalog.GetString("Fetch More"), delegate { source.FetchMore(); })); } } }; source.MessageNotify += (o, a) => { if (source.CurrentMessage != null && source.CurrentMessage.Text == more_text && source.CurrentMessage.IsHidden) { last_hid_more = DateTime.Now; } }; PackStart(sw, true, true, 0); ShowAll(); }
private void Layout() { //Hyena.Log.Information ("ListBrowser LayoutLeft"); Reset(); container = new HPaned(); Paned filter_box = new HPaned(); filter_box.PositionSet = true; Paned current_pane = filter_box; for (int i = 0; i < filter_scrolled_windows.Count; i++) { ScrolledWindow window = filter_scrolled_windows[i]; bool last_even_filter = (i == filter_scrolled_windows.Count - 1 && filter_scrolled_windows.Count % 2 == 0); if (i > 0 && !last_even_filter) { Paned new_pane = new HPaned(); current_pane.Pack2(new_pane, true, false); current_pane.Position = 350; PersistentPaneController.Control(current_pane, ControllerName(i)); current_pane = new_pane; } if (last_even_filter) { current_pane.Pack2(window, true, false); current_pane.Position = 350; PersistentPaneController.Control(current_pane, ControllerName(i)); } else { /*if (i == 0) * current_pane.Pack1 (window, false, false); * else*/ current_pane.Pack1(window, true, false); } } container.Pack1(filter_box, true, false); container.Pack2(main_scrolled_window, true, false); browser_container = filter_box; container.Position = 275; PersistentPaneController.Control(container, ControllerName(-1)); ShowPack(); }
private void OnArtistFilterChanged(object o, ChangedArgs args) { Widget new_artist_view = args.Current.Value == 0 ? artist_view : albumartist_view; Widget old_artist_view = args.Current.Value == 1 ? artist_view : albumartist_view; List <ScrolledWindow> new_filter_list = new List <ScrolledWindow> (); List <ScrolledWindow> old_filter_list = new List <ScrolledWindow> (filter_scrolled_windows); foreach (ScrolledWindow fw in old_filter_list) { bool contains = false; foreach (Widget child in fw.AllChildren) { if (child == old_artist_view) { contains = true; } } if (contains) { Widget view_widget = (Widget)new_artist_view; if (view_widget.Parent == null) { SetupFilterView(new_artist_view as ArtistListView); } ScrolledWindow win = (ScrolledWindow)view_widget.Parent; new_filter_list.Add(win); } else { new_filter_list.Add(fw); } } filter_scrolled_windows = new_filter_list; ClearFilterSelections(); Layout(); ArtistFilterType.Set(args.Current.Value == 1 ? "albumartist" : "artist"); }