protected override void OnBuildToolBar(Toolbar tb) { base.OnBuildToolBar(tb); if (fill_sep == null) { fill_sep = new Gtk.SeparatorToolItem(); } tb.AppendItem(fill_sep); if (fill_label == null) { fill_label = new ToolBarLabel(string.Format(" {0}: ", Catalog.GetString("Fill Style"))); } tb.AppendItem(fill_label); if (fill_button == null) { fill_button = new ToolBarDropDownButton(); fill_button.AddItem(Catalog.GetString("Outline Shape"), "ShapeTool.Outline.png", 0); fill_button.AddItem(Catalog.GetString("Fill Shape"), "ShapeTool.Fill.png", 1); fill_button.AddItem(Catalog.GetString("Fill and Outline Shape"), "ShapeTool.OutlineFill.png", 2); } tb.AppendItem(fill_button); }
protected override void OnBuildToolBar(Toolbar tb) { base.OnBuildToolBar(tb); if (fill_sep == null) { fill_sep = new Gtk.SeparatorToolItem(); } tb.AppendItem(fill_sep); if (fill_label == null) { fill_label = new ToolBarLabel(string.Format(" {0}: ", Catalog.GetString("Fill Style"))); } tb.AppendItem(fill_label); if (fill_button == null) { fill_button = new ToolBarDropDownButton(); fill_button.AddItem(Catalog.GetString("Outline Shape"), "ShapeTool.Outline.png", 0); fill_button.AddItem(Catalog.GetString("Fill Shape"), "ShapeTool.Fill.png", 1); fill_button.AddItem(Catalog.GetString("Fill and Outline Shape"), "ShapeTool.OutlineFill.png", 2); } tb.AppendItem(fill_button); Gtk.ComboBox dpbBox = dashPBox.SetupToolbar(tb); if (dpbBox != null) { dpbBox.Changed += (o, e) => { dashPattern = dpbBox.ActiveText; }; } }
public override void Initialize() { separator = new Gtk.SeparatorToolItem(); separator.Show(); record_button = new Gtk.ToolButton(Gtk.Stock.MediaRecord); record_button.Clicked += OnRecordButtonClicked; record_button.Show(); play_button = new Gtk.ToolButton(Gtk.Stock.MediaPlay); play_button.Clicked += OnPlayButtonClicked; play_button.Show(); stop_button = new Gtk.ToolButton(Gtk.Stock.MediaStop); stop_button.Clicked += OnStopButtonClicked; stop_button.Show(); delete_item = new Gtk.MenuItem("Delete Voice Note"); delete_item.Activated += OnDeleteItemActivated; delete_item.Show(); initialize(); }
public override void Initialize () { separator = new Gtk.SeparatorToolItem (); separator.Show (); record_button = new Gtk.ToolButton (Gtk.Stock.MediaRecord); record_button.Clicked += OnRecordButtonClicked; record_button.Show (); play_button = new Gtk.ToolButton (Gtk.Stock.MediaPlay); play_button.Clicked += OnPlayButtonClicked; play_button.Show (); stop_button = new Gtk.ToolButton (Gtk.Stock.MediaStop); stop_button.Clicked += OnStopButtonClicked; stop_button.Show (); delete_item = new Gtk.MenuItem ("Delete Voice Note"); delete_item.Activated += OnDeleteItemActivated; delete_item.Show (); initialize (); }
protected override void OnBuildToolBar (Toolbar tb) { base.OnBuildToolBar(tb); if (fill_sep == null) fill_sep = new Gtk.SeparatorToolItem (); tb.AppendItem (fill_sep); if (fill_label == null) fill_label = new ToolBarLabel (string.Format (" {0}: ", Catalog.GetString ("Fill Style"))); tb.AppendItem (fill_label); if (fill_button == null) { fill_button = new ToolBarDropDownButton (); fill_button.AddItem (Catalog.GetString ("Outline Shape"), "ShapeTool.Outline.png", 0); fill_button.AddItem (Catalog.GetString ("Fill Shape"), "ShapeTool.Fill.png", 1); fill_button.AddItem (Catalog.GetString ("Fill and Outline Shape"), "ShapeTool.OutlineFill.png", 2); } tb.AppendItem (fill_button); Gtk.ComboBox dpbBox = dashPBox.SetupToolbar(tb); if (dpbBox != null) { dpbBox.Changed += (o, e) => { dashPattern = dpbBox.ActiveText; }; } }
protected override void OnBuildToolBar(Toolbar tb) { base.OnBuildToolBar(tb); if (fill_sep == null) fill_sep = new Gtk.SeparatorToolItem (); tb.AppendItem (fill_sep); if (fill_label == null) fill_label = new ToolBarLabel (string.Format (" {0}: ", Catalog.GetString ("Fill Style"))); tb.AppendItem (fill_label); if (fill_button == null) { fill_button = new ToolBarDropDownButton (); fill_button.AddItem (Catalog.GetString ("Outline Shape"), "ShapeTool.Outline.png", 0); fill_button.AddItem (Catalog.GetString ("Fill Shape"), "ShapeTool.Fill.png", 1); fill_button.AddItem (Catalog.GetString ("Fill and Outline Shape"), "ShapeTool.OutlineFill.png", 2); } tb.AppendItem (fill_button); }
private void InitializeGtkObjects(Gtk.Builder b) { m_adjustmentAudioPaddingAfter = (Gtk.Adjustment) b.GetObject("adjustment_audio_padding_after"); m_adjustmentAudioPaddingBefore = (Gtk.Adjustment) b.GetObject("adjustment_audio_padding_before"); m_adjustmentMaxImageHeight = (Gtk.Adjustment) b.GetObject("adjustment_max_image_height"); m_adjustmentMaxImageWidth = (Gtk.Adjustment) b.GetObject("adjustment_max_image_width"); m_episodeAdjustment = (Gtk.Adjustment) b.GetObject("episode_adjustment"); m_image1 = (Gtk.Image) b.GetObject("image1"); m_liststoreImageRescaleOptions = (Gtk.ListStore) b.GetObject("liststore_image_rescale_options"); m_liststoreLanguages = (Gtk.ListStore) b.GetObject("liststore_languages"); m_liststoreLines = (Gtk.ListStore) b.GetObject("liststore_lines"); m_previewWindow = (Gtk.Window) b.GetObject("preview_window"); m_box5 = (Gtk.Box) b.GetObject("box5"); m_toolbarPreview = (Gtk.Toolbar) b.GetObject("toolbar_preview"); m_toolbuttonGo = (Gtk.ToolButton) b.GetObject("toolbutton_go"); m_toolbuttonRefresh = (Gtk.ToolButton) b.GetObject("toolbutton_refresh"); m_toolbuttonSeparator1 = (Gtk.SeparatorToolItem) b.GetObject("toolbutton_separator1"); m_toolbuttonSelectAll = (Gtk.ToolButton) b.GetObject("toolbutton_select_all"); m_toolbuttonSelectNone = (Gtk.ToolButton) b.GetObject("toolbutton_select_none"); m_toolbuttonInvert = (Gtk.ToolButton) b.GetObject("toolbutton_invert"); m_toolbuttonSeparator2 = (Gtk.SeparatorToolItem) b.GetObject("toolbutton_separator2"); m_toolbuttonToggleActivation = (Gtk.ToolButton) b.GetObject("toolbutton_toggle_activation"); m_toolbuttonMerge = (Gtk.ToolButton) b.GetObject("toolbutton_merge"); m_scrolledwindow1 = (Gtk.ScrolledWindow) b.GetObject("scrolledwindow1"); m_treeviewLines = (Gtk.TreeView) b.GetObject("treeview_lines"); m_treeviewSelectionLines = (Gtk.TreeSelection) b.GetObject("treeview-selection_lines"); m_treeviewcolumnTargetLanguage = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_target_language"); m_cellrenderertextTargetLanguage = (Gtk.CellRendererText) b.GetObject("cellrenderertext_target_language"); m_treeviewcolumnNativeLanguage = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_native_language"); m_cellrenderertextNativeLanguage = (Gtk.CellRendererText) b.GetObject("cellrenderertext_native_language"); m_treeviewcolumnActors = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_actors"); m_cellrenderertextActors = (Gtk.CellRendererText) b.GetObject("cellrenderertext_actors"); m_treeviewcolumnStart = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_start"); m_cellrendertextStart = (Gtk.CellRendererText) b.GetObject("cellrendertext_start"); m_cellrendertextDuration = (Gtk.CellRendererText) b.GetObject("cellrendertext_duration"); m_frame10 = (Gtk.Frame) b.GetObject("frame10"); m_alignment10 = (Gtk.Alignment) b.GetObject("alignment10"); m_grid4 = (Gtk.Grid) b.GetObject("grid4"); m_buttonReplaceInSub2 = (Gtk.Button) b.GetObject("button_replace_in_sub2"); m_buttonSelectLinesBySearch = (Gtk.Button) b.GetObject("button_select_lines_by_search"); m_buttonReplaceInSub1 = (Gtk.Button) b.GetObject("button_replace_in_sub1"); m_entryLinesSearch = (Gtk.Entry) b.GetObject("entry_lines_search"); m_entryReplaceRegexTo = (Gtk.Entry) b.GetObject("entry_replace_regex_to"); m_entryReplaceRegexFrom = (Gtk.Entry) b.GetObject("entry_replace_regex_from"); m_label5 = (Gtk.Label) b.GetObject("label5"); m_label17 = (Gtk.Label) b.GetObject("label17"); m_labelNumCardsSelected = (Gtk.Label) b.GetObject("label_num_cards_selected"); m_frame11 = (Gtk.Frame) b.GetObject("frame11"); m_alignment11 = (Gtk.Alignment) b.GetObject("alignment11"); m_box7 = (Gtk.Box) b.GetObject("box7"); m_frame12 = (Gtk.Frame) b.GetObject("frame12"); m_box11 = (Gtk.Box) b.GetObject("box11"); m_eventboxImagePreview = (Gtk.EventBox) b.GetObject("eventbox_image_preview"); m_imagePreview = (Gtk.Image) b.GetObject("image_preview"); m_buttonPlayContent = (Gtk.Button) b.GetObject("button_play_content"); m_label23 = (Gtk.Label) b.GetObject("label23"); m_frame13 = (Gtk.Frame) b.GetObject("frame13"); m_box12 = (Gtk.Box) b.GetObject("box12"); m_scrolledwindow2 = (Gtk.ScrolledWindow) b.GetObject("scrolledwindow2"); m_textviewTargetLanguage = (Gtk.TextView) b.GetObject("textview_target_language"); m_scrolledwindow3 = (Gtk.ScrolledWindow) b.GetObject("scrolledwindow3"); m_textviewNativeLanguage = (Gtk.TextView) b.GetObject("textview_native_language"); m_label24 = (Gtk.Label) b.GetObject("label24"); m_label22 = (Gtk.Label) b.GetObject("label22"); m_liststoreSubEncoding = (Gtk.ListStore) b.GetObject("liststore_sub_encoding"); m_liststoreSubStreams = (Gtk.ListStore) b.GetObject("liststore_sub_streams"); m_subtitleOptionsWindow = (Gtk.Window) b.GetObject("subtitle_options_window"); m_box13 = (Gtk.Box) b.GetObject("box13"); m_frame14 = (Gtk.Frame) b.GetObject("frame14"); m_comboboxSubEncoding = (Gtk.ComboBox) b.GetObject("combobox_sub_encoding"); m_cellrenderertextSubEncoding = (Gtk.CellRendererText) b.GetObject("cellrenderertext_sub_encoding"); m_label3 = (Gtk.Label) b.GetObject("label3"); m_frame15 = (Gtk.Frame) b.GetObject("frame15"); m_comboboxSubStream = (Gtk.ComboBox) b.GetObject("combobox_sub_stream"); m_cellrendertextSubStreams = (Gtk.CellRendererText) b.GetObject("cellrendertext_sub_streams"); m_label4 = (Gtk.Label) b.GetObject("label4"); m_buttonSubOptionsApply = (Gtk.Button) b.GetObject("button_sub_options_apply"); m_numericalAdjustmentSub1 = (Gtk.Adjustment) b.GetObject("numerical_adjustment_sub1"); m_numericalAdjustmentSub2 = (Gtk.Adjustment) b.GetObject("numerical_adjustment_sub2"); m_mainWindow = (Gtk.Window) b.GetObject("main_window"); m_box1 = (Gtk.Box) b.GetObject("box1"); m_menubar1 = (Gtk.MenuBar) b.GetObject("menubar1"); m_menuitem1 = (Gtk.MenuItem) b.GetObject("menuitem1"); m_menu1 = (Gtk.Menu) b.GetObject("menu1"); m_imagemenuitemNew = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_new"); m_imagemenuitemOpen = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_open"); m_imagemenuitemSave = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_save"); m_imagemenuitemSaveAs = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_save_as"); m_separatormenuitem1 = (Gtk.SeparatorMenuItem) b.GetObject("separatormenuitem1"); m_imagemenuitemClose = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_close"); m_menuitem3 = (Gtk.MenuItem) b.GetObject("menuitem3"); m_menu3 = (Gtk.Menu) b.GetObject("menu3"); m_imagemenuitem10 = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem10"); m_infobar1 = (Gtk.InfoBar) b.GetObject("infobar1"); m_infobarActionArea = (Gtk.ButtonBox) b.GetObject("infobar-action_area"); m_infobarContentArea = (Gtk.Box) b.GetObject("infobar-content_area"); m_labelInInfobar = (Gtk.Label) b.GetObject("label_in_infobar"); m_box2 = (Gtk.Box) b.GetObject("box2"); m_frame1 = (Gtk.Frame) b.GetObject("frame1"); m_alignment1 = (Gtk.Alignment) b.GetObject("alignment1"); m_grid1 = (Gtk.Grid) b.GetObject("grid1"); m_entryTargetLanguage = (Gtk.Entry) b.GetObject("entry_target_language"); m_entryOutputDirectory = (Gtk.Entry) b.GetObject("entry_output_directory"); m_entryNativeLanguage = (Gtk.Entry) b.GetObject("entry_native_language"); m_entryVideoFile = (Gtk.Entry) b.GetObject("entry_video_file"); m_buttonTargetLanguageChoose = (Gtk.Button) b.GetObject("button_target_language_choose"); m_buttonDirectoryChoose = (Gtk.Button) b.GetObject("button_directory_choose"); m_buttonNativeLanguageChoose = (Gtk.Button) b.GetObject("button_native_language_choose"); m_buttonVideoFileChoose = (Gtk.Button) b.GetObject("button_video_file_choose"); m_buttonTargetLanguageOptions = (Gtk.Button) b.GetObject("button_target_language_options"); m_buttonNativeLanguageOptions = (Gtk.Button) b.GetObject("button_native_language_options"); m_buttonVideoOptions = (Gtk.Button) b.GetObject("button_video_options"); m_buttonAudioChoose = (Gtk.Button) b.GetObject("button_audio_choose"); m_entryAudioFile = (Gtk.Entry) b.GetObject("entry_audio_file"); m_label1 = (Gtk.Label) b.GetObject("label1"); m_frame2 = (Gtk.Frame) b.GetObject("frame2"); m_alignment2 = (Gtk.Alignment) b.GetObject("alignment2"); m_grid5 = (Gtk.Grid) b.GetObject("grid5"); m_expanderSubtitleOptions = (Gtk.Expander) b.GetObject("expander_subtitle_options"); m_box9 = (Gtk.Box) b.GetObject("box9"); m_frame4 = (Gtk.Frame) b.GetObject("frame4"); m_alignment4 = (Gtk.Alignment) b.GetObject("alignment4"); m_grid2 = (Gtk.Grid) b.GetObject("grid2"); m_label8 = (Gtk.Label) b.GetObject("label8"); m_label9 = (Gtk.Label) b.GetObject("label9"); m_comboboxtextCorrectTimingsModeSub1 = (Gtk.ComboBoxText) b.GetObject("comboboxtext_correct_timings_mode_sub1"); m_spinbuttonSub1TimeShift = (Gtk.SpinButton) b.GetObject("spinbutton_sub1_time_shift"); m_label6 = (Gtk.Label) b.GetObject("label6"); m_frame5 = (Gtk.Frame) b.GetObject("frame5"); m_alignment5 = (Gtk.Alignment) b.GetObject("alignment5"); m_grid3 = (Gtk.Grid) b.GetObject("grid3"); m_label7 = (Gtk.Label) b.GetObject("label7"); m_label10 = (Gtk.Label) b.GetObject("label10"); m_comboboxtextCorrectTimingsModeSub2 = (Gtk.ComboBoxText) b.GetObject("comboboxtext_correct_timings_mode_sub2"); m_spinbuttonSub2TimeShift = (Gtk.SpinButton) b.GetObject("spinbutton_sub2_time_shift"); m_label12 = (Gtk.Label) b.GetObject("label12"); m_frame3 = (Gtk.Frame) b.GetObject("frame3"); m_alignment3 = (Gtk.Alignment) b.GetObject("alignment3"); m_box3 = (Gtk.Box) b.GetObject("box3"); m_checkbuttonUseSub1Timings = (Gtk.CheckButton) b.GetObject("checkbutton_use_sub1_timings"); m_checkbuttonUseSub2Timings = (Gtk.CheckButton) b.GetObject("checkbutton_use_sub2_timings"); m_label11 = (Gtk.Label) b.GetObject("label11"); m_label20 = (Gtk.Label) b.GetObject("label20"); m_expanderAudioOptions = (Gtk.Expander) b.GetObject("expander_audio_options"); m_box15 = (Gtk.Box) b.GetObject("box15"); m_frame17 = (Gtk.Frame) b.GetObject("frame17"); m_alignment14 = (Gtk.Alignment) b.GetObject("alignment14"); m_box16 = (Gtk.Box) b.GetObject("box16"); m_checkbuttonNormalizeAudio = (Gtk.CheckButton) b.GetObject("checkbutton_normalize_audio"); m_checkbuttonDeactivateAudioClips = (Gtk.CheckButton) b.GetObject("checkbutton_deactivate_audio_clips"); m_label26 = (Gtk.Label) b.GetObject("label26"); m_frame16 = (Gtk.Frame) b.GetObject("frame16"); m_alignment13 = (Gtk.Alignment) b.GetObject("alignment13"); m_grid6 = (Gtk.Grid) b.GetObject("grid6"); m_label28 = (Gtk.Label) b.GetObject("label28"); m_label29 = (Gtk.Label) b.GetObject("label29"); m_spinbuttonAudioPaddingBefore = (Gtk.SpinButton) b.GetObject("spinbutton_audio_padding_before"); m_spinbuttonAudioPaddingAfter = (Gtk.SpinButton) b.GetObject("spinbutton_audio_padding_after"); m_label27 = (Gtk.Label) b.GetObject("label27"); m_label53 = (Gtk.Label) b.GetObject("label53"); m_expanderImageOptions = (Gtk.Expander) b.GetObject("expander_image_options"); m_box17 = (Gtk.Box) b.GetObject("box17"); m_frame19 = (Gtk.Frame) b.GetObject("frame19"); m_alignment16 = (Gtk.Alignment) b.GetObject("alignment16"); m_spinbuttonMaxImageWidth = (Gtk.SpinButton) b.GetObject("spinbutton_max_image_width"); m_spinbuttonMaxImageHeight = (Gtk.SpinButton) b.GetObject("spinbutton_max_image_height"); m_comboboxtextRescaleMode = (Gtk.ComboBox) b.GetObject("comboboxtext_rescale_mode"); m_label13 = (Gtk.Label) b.GetObject("label13"); m_label2 = (Gtk.Label) b.GetObject("label2"); m_frame7 = (Gtk.Frame) b.GetObject("frame7"); m_alignment7 = (Gtk.Alignment) b.GetObject("alignment7"); m_label16 = (Gtk.Label) b.GetObject("label16"); m_spinbuttonEpisodeNumber = (Gtk.SpinButton) b.GetObject("spinbutton_episode_number"); m_entryDeckName = (Gtk.Entry) b.GetObject("entry_deck_name"); m_label15 = (Gtk.Label) b.GetObject("label15"); m_buttonPreview = (Gtk.Button) b.GetObject("button_preview"); m_label18 = (Gtk.Label) b.GetObject("label18"); m_label19 = (Gtk.Label) b.GetObject("label19"); m_comboboxTargetLanguage = (Gtk.ComboBox) b.GetObject("combobox_target_language"); m_label14 = (Gtk.Label) b.GetObject("label14"); m_windowProgressInfo = (Gtk.Window) b.GetObject("window_progress_info"); m_alignment12 = (Gtk.Alignment) b.GetObject("alignment12"); m_box14 = (Gtk.Box) b.GetObject("box14"); m_progressbarProgressInfo = (Gtk.ProgressBar) b.GetObject("progressbar_progress_info"); m_buttonCancelOperation = (Gtk.Button) b.GetObject("button_cancel_operation"); }
public MonoreportsDesignerControl() { Build (); MonoReports.Model.Engine.ReportEngine.EvaluatorInit(); Report startReport = newReportTemplate(); double resolutionX = ((double) Gdk.Screen.Default.Width) / ((double) Gdk.Screen.Default.WidthMm) * 25.4; compilerService = new CompilerService(ReportExtensions.ScriptTemplateForDataSourceEvaluation); pixbufRepository = new PixbufRepository () { Report = startReport }; workspaceService = new WorkspaceService (this,maindesignview1.DesignDrawingArea,maindesignview1.PreviewDrawingArea,mainPropertygrid, StatusBarLabel); var reportRenderer = new ReportRenderer(){ ResolutionX = resolutionX}; reportRenderer.RegisterRenderer(typeof(Controls.TextBlock), new TextBlockRenderer()); reportRenderer.RegisterRenderer(typeof(Controls.Line), new LineRenderer()); reportRenderer.RegisterRenderer(typeof(MonoReports.Model.Controls.Image), new ImageRenderer(){ PixbufRepository = pixbufRepository}); SectionRenderer sr = new SectionRenderer(); reportRenderer.RegisterRenderer(typeof(Controls.ReportHeaderSection), sr); reportRenderer.RegisterRenderer(typeof(Controls.ReportFooterSection), sr); reportRenderer.RegisterRenderer(typeof(Controls.DetailSection), sr); reportRenderer.RegisterRenderer(typeof(Controls.PageHeaderSection), sr); reportRenderer.RegisterRenderer(typeof(Controls.PageFooterSection), sr); designService = new DesignService (workspaceService,reportRenderer,pixbufRepository,compilerService, startReport); toolBoxService = new ToolBoxService (); designService.ToolBoxService = toolBoxService; maindesignview1.DesignService = designService; maindesignview1.WorkSpaceService = workspaceService; maindesignview1.ReportRenderer = reportRenderer; workspaceService.InvalidateDesignArea (); reportExplorer.DesignService = designService; reportExplorer.Workspace = workspaceService; toolBoxService.AddTool (new ZoomTool (designService)); toolBoxService.AddTool (new LineTool (designService)); toolBoxService.AddTool (new LineToolV (designService)); toolBoxService.AddTool (new LineToolH (designService)); toolBoxService.AddTool (new TextBlockTool (designService)); //TODO 3tk: currently not supported //toolBoxService.AddTool (new SubreportTool (designService)); toolBoxService.AddTool (new SectionTool (designService)); toolBoxService.AddTool (new ImageTool (designService)); toolBoxService.AddTool (new RectTool (designService)); toolBoxService.BuildToolBar (mainToolbar); ToolBarButton exportPdfToolButton = new ToolBarButton ("pdf.png","exportPdf",Catalog.GetString("Export to pdf")); exportPdfToolButton.Clicked += delegate(object sender, EventArgs e) { designService.ExportToPdf(); }; var sep = new Gtk.SeparatorToolItem(); mainToolbar.Insert (sep,mainToolbar.NItems); mainToolbar.Insert (exportPdfToolButton,mainToolbar.NItems); //ToolBarButton btn = new ToolBarButton("gtk-media-play","execute","Execute report"); //mainToolbar.Insert (btn,mainToolbar.NItems); mainPropertygrid.LoadMonoreportsExtensions(); designService.Report = startReport; }