public ICSGameObserverWidget(ICSClient client) : base() { split = new HPaned (); this.client = client; currentGames = new Hashtable (); gamesBook = new Notebook (); gamesBook.ShowTabs = false; gamesList = new TreeView (); gamesStore = new ListStore (typeof (string), typeof (string)); gamesList.Model = gamesStore; gamesList.AppendColumn ("Games", new CellRendererText (), "markup", 0); ScrolledWindow scroll = new ScrolledWindow (); scroll.HscrollbarPolicy = scroll.VscrollbarPolicy = PolicyType.Automatic; scroll.Add (gamesList); gamesList.CursorChanged += OnGamesListCursorChanged; split.Add1 (scroll); split.Add2 (gamesBook); split.ShowAll (); PackStart (split, true, true, 2); client.GameMessageEvent += OnGameMessage; }
//Gtk.Action actOpen = new Gtk.Action("Open", "Open", "Open file", Stock.Open); public MainWindow() : base("TikzEdt ") { (GlobalUI.UI as GlobalUIGTK).MainForm = this; ScintillaDocumentWrapper.TheOneAndOnly = txtCode; TheVM = new MainWindowVM <ScintillaDocumentWrapper>(TheCompiler.Instance); rasterControl1 = rasterControl1Box.RasterControl; rasterControl1.Rasterizer = rasterControl1.TheRasterModel; txtStatus.Buffer.TagTable.Add(new TextTag("red") { Foreground = "red" }); //txtCode.LexerLanguage = "html"; txtCode.Lexer = 4; // html Resize(800, 600); Destroyed += (s, e) => Application.Quit(); myLabel.Text = "Hello World!!!!"; CreateMenus(); CreateToolBars(); VBox vb = new VBox(false, 0); vb.PackStart(mainMenu, false, false, 0); vb.PackStart(mainToolbar, false, false, 0); vb.PackStart(toolsToolbar, false, false, 0); HBox hb = new HBox(false, 0); hb.PackStart(toolsPaneBar, false, false, 0); ScrolledWindow scrw = txtStatusWnd = new ScrolledWindow(); scrw.Add(txtStatus); statusTabPanel.AppendPage(scrw, new Label("Status")); statusTabPanel.AppendPage(lstErrors, new Label("Errors")); scrw = new ScrolledWindow(); scrw.Add(txtTexOut); statusTabPanel.AppendPage(scrw, new Label("TeX Output")); //txtCode.SetText("This is Scintilla"); vSplitter1.Add1(txtCode); vSplitter1.Add2(statusTabPanel); vSplitter1.Position = 400; hSplitter1.Add1(vSplitter1); var sw = new ScrolledWindow(); sw.HscrollbarPolicy = Gtk.PolicyType.Automatic; sw.VscrollbarPolicy = Gtk.PolicyType.Automatic; //sw.Placement = CornerType. //Alignment a = new Alignment(0.5f,0.5f,0,0); //var vv = new Table(1,1,false); //vv.Attach(rasterControl1, 0, 0, 1,1,AttachOptions.Expand, AttachOptions.Expand, 0,0); /*var vv = new VBox(); * var vh = new HBox(); * vv.PackStart(rasterControl1, true, false, 0); * vh.PackStart(vv, true, false, 0);*/ Alignment al = new Alignment(.5f, .5f, 0, 0); al.Add(rasterControl1Box); sw.Add(al); hSplitter1.Add2(sw); hSplitter1.Position = 350; hSplitter2.Add1(new TextView()); hSplitter2.Add2(hSplitter1); hSplitter2.Position = 150; hb.PackStart(hSplitter2, true, true, 0); vb.PackStart(hb, true, true, 0); statusBar.PackStart(new Alignment(.5f, .5f, 1, 1), true, true, 0); statusBar.PackStart(lblStandAlone, false, false, 0); statusBar.PackStart(new Label("Grid"), false, false, 0); statusBar.PackStart(cmbGrid, false, false, 0); statusBar.PackStart(new Label("RS"), false, false, 0); statusBar.PackStart(txtRadialSteps, false, false, 0); statusBar.PackStart(new Label("RO"), false, false, 0); statusBar.PackStart(txtRadialOffset, false, false, 0); //statusBar.PackStart(new Separator(), false, false, 0); Button b = new Button(Stock.ZoomOut); //b.Label = ""; statusBar.PackStart(b); statusBar.PackStart(scZoom); statusBar.PackStart(new Button(Stock.ZoomIn)); vb.PackEnd(statusBar, false, false, 0); Add(vb); SetupBindings(); ShowAll(); }
void CreateControl() { control = new HPaned(); store = new Gtk.ListStore(typeof(Gdk.Pixbuf), // image - type typeof(bool), // read? typeof(Task)); // read? -- use Pango weight TreeModelFilterVisibleFunc filterFunct = new TreeModelFilterVisibleFunc(FilterTaskTypes); filter = new TreeModelFilter(store, null); filter.VisibleFunc = filterFunct; sort = new TreeModelSort(filter); sort.SetSortFunc(VisibleColumns.Type, SeverityIterSort); sort.SetSortFunc(VisibleColumns.Project, ProjectIterSort); sort.SetSortFunc(VisibleColumns.File, FileIterSort); view = new MonoDevelop.Ide.Gui.Components.PadTreeView(sort); view.RulesHint = true; view.DoPopupMenu = (evnt) => IdeApp.CommandService.ShowContextMenu(view, evnt, CreateMenu()); AddColumns(); LoadColumnsVisibility(); view.Columns[VisibleColumns.Type].SortColumnId = VisibleColumns.Type; view.Columns[VisibleColumns.Project].SortColumnId = VisibleColumns.Project; view.Columns[VisibleColumns.File].SortColumnId = VisibleColumns.File; sw = new MonoDevelop.Components.CompactScrolledWindow(); sw.ShadowType = ShadowType.None; sw.Add(view); TaskService.Errors.TasksRemoved += DispatchService.GuiDispatch <TaskEventHandler> (ShowResults); TaskService.Errors.TasksAdded += DispatchService.GuiDispatch <TaskEventHandler> (TaskAdded); TaskService.Errors.TasksChanged += DispatchService.GuiDispatch <TaskEventHandler> (TaskChanged); TaskService.Errors.CurrentLocationTaskChanged += HandleTaskServiceErrorsCurrentLocationTaskChanged; IdeApp.Workspace.FirstWorkspaceItemOpened += OnCombineOpen; IdeApp.Workspace.LastWorkspaceItemClosed += OnCombineClosed; view.RowActivated += new RowActivatedHandler(OnRowActivated); iconWarning = sw.RenderIcon(Gtk.Stock.DialogWarning, Gtk.IconSize.Menu, ""); iconError = sw.RenderIcon(Gtk.Stock.DialogError, Gtk.IconSize.Menu, ""); iconInfo = sw.RenderIcon(Gtk.Stock.DialogInfo, Gtk.IconSize.Menu, ""); control.Add1(sw); outputView = new LogView(); control.Add2(outputView); Control.ShowAll(); control.SizeAllocated += HandleControlSizeAllocated; bool outputVisible = PropertyService.Get <bool> (outputViewVisiblePropertyName, false); if (outputVisible) { outputView.Visible = true; logBtn.Active = true; } else { outputView.Hide(); } sw.SizeAllocated += HandleSwSizeAllocated; // Load existing tasks foreach (Task t in TaskService.Errors) { AddTask(t); } control.FocusChain = new Gtk.Widget [] { sw }; }
void CreateControl() { control = new HPaned(); store = new Gtk.TreeStore(typeof(Xwt.Drawing.Image), // image - type typeof(bool), // read? typeof(TaskListEntry), // read? -- use Pango weight typeof(string)); SemanticModelAttribute modelAttr = new SemanticModelAttribute("store__Type", "store__Read", "store__Task", "store__Description"); TypeDescriptor.AddAttributes(store, modelAttr); TreeModelFilterVisibleFunc filterFunct = new TreeModelFilterVisibleFunc(FilterTasks); filter = new TreeModelFilter(store, null); filter.VisibleFunc = filterFunct; sort = new TreeModelSort(filter); sort.SetSortFunc(VisibleColumns.Type, SeverityIterSort); sort.SetSortFunc(VisibleColumns.Project, ProjectIterSort); sort.SetSortFunc(VisibleColumns.File, FileIterSort); sort.SetSortFunc(VisibleColumns.Category, CategoryIterSort); view = new PadTreeView(sort); view.Selection.Mode = SelectionMode.Multiple; view.ShowExpanders = true; view.RulesHint = true; view.DoPopupMenu = (evnt) => IdeApp.CommandService.ShowContextMenu(view, evnt, CreateMenu()); AddColumns(); LoadColumnsVisibility(); view.Columns [VisibleColumns.Type].SortColumnId = VisibleColumns.Type; view.Columns [VisibleColumns.Project].SortColumnId = VisibleColumns.Project; view.Columns [VisibleColumns.File].SortColumnId = VisibleColumns.File; view.Columns [VisibleColumns.Category].SortColumnId = VisibleColumns.Category; sw = new MonoDevelop.Components.CompactScrolledWindow(); sw.ShadowType = ShadowType.None; sw.Add(view); TaskService.Errors.TasksRemoved += ShowResults; TaskService.Errors.TasksAdded += TaskAdded; TaskService.Errors.TasksChanged += TaskChanged; TaskService.Errors.CurrentLocationTaskChanged += HandleTaskServiceErrorsCurrentLocationTaskChanged; IdeApp.Workspace.FirstWorkspaceItemOpened += OnCombineOpen; IdeApp.Workspace.LastWorkspaceItemClosed += OnCombineClosed; view.RowActivated += new RowActivatedHandler(OnRowActivated); iconWarning = ImageService.GetIcon(Ide.Gui.Stock.Warning, Gtk.IconSize.Menu); iconError = ImageService.GetIcon(Ide.Gui.Stock.Error, Gtk.IconSize.Menu); iconInfo = ImageService.GetIcon(Ide.Gui.Stock.Information, Gtk.IconSize.Menu); iconEmpty = ImageService.GetIcon(Ide.Gui.Stock.Empty, Gtk.IconSize.Menu); control.Add1(sw); outputView = new LogView { Name = "buildOutput" }; control.Add2(outputView); control.ShowAll(); control.SizeAllocated += HandleControlSizeAllocated; bool outputVisible = OutputViewVisible; if (outputVisible) { outputView.Visible = true; logBtn.Active = true; } else { outputView.Hide(); } sw.SizeAllocated += HandleSwSizeAllocated; // Load existing tasks foreach (TaskListEntry t in TaskService.Errors) { AddTask(t); } control.FocusChain = new Gtk.Widget [] { outputView }; }
public ChessGameWidget(GameViewerUI viewer) : base() { gameView = new ChessGameView (); gamesListWidget = new SearchableGamesListWidget (viewer); gameView.ShowNthMove += OnShowNthMoveEvent; boardWidget = new ChessGameBoard (); book = new Notebook (); splitPane = new HPaned (); splitPane.Add1 (boardWidget); splitPane.Add2 (GetRightPane ()); PackStart (splitPane, true, true, 2); BoardWidget.Board.highLightMove = App.Session.HighLightMove; int pos = App.Session.ViewerSplitPanePosition; int height = App.Session.ViewerHeight; if (pos > height) pos = height / 2; splitPane.Position = pos; gamesListWidget.View.GameSelectionEvent += OnGameSelectionEvent; viewer.GamesLoadedEvent += OnGamesLoaded; ShowAll (); }
public ChessGameWidget() : base() { gameView = new ChessGameView (); gameView.ShowNthMove += OnShowNthMoveEvent; boardWidget = new ChessGameBoard (); splitPane = new HPaned (); splitPane.Add1 (boardWidget); splitPane.Add2 (GetRightPane ()); PackStart (splitPane, true, true, 2); ShowAll (); }