本文整理汇总了C#中Gtk.Notebook.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Notebook.Show方法的具体用法?C# Notebook.Show怎么用?C# Notebook.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Notebook
的用法示例。
在下文中一共展示了Notebook.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewGui
public ViewGui()
: base("")
{
string fullName = "MainView.gui.glade";
Assembly a = Assembly.GetAssembly(this.GetType());
Console.WriteLine(a.CodeBase);
if (!System.IO.File.Exists(a.CodeBase + "/" + fullName))
fullName = "gui.glade";
glade = new XML (Assembly.GetCallingAssembly (), fullName, "ViewGui", null);
glade.Autoconnect (this);
Window win = (Window) glade ["ViewGui"];
win.Maximize();
//Initialisation du menu principal
MainUIManager uim = new MainUIManager (this);
vboxMain.PackStart (uim.MenuBar, false, false, 0);
((Gtk.Box.BoxChild)(vboxMain[uim.MenuBar])).Position = 0;
//Pagecontrol des vues
notebookViews = new Notebook ();
hpanedMain.Pack2 (notebookViews, true, false);
notebookViews.Show ();
//notebookViews.RemovePage(0);
}
示例2: Toolbox
public Toolbox()
{
_notebook=new Notebook();
_notebook.TabPos=Gtk.PositionType.Bottom;
_notebook.TabBorder=0;
_notebook.ShowTabs=false;
_notebook.TabVborder=Sugar.Style.TOOLBOX_TAB_VBORDER;
_notebook.TabHborder=Sugar.Style.TOOLBOX_TAB_VBORDER;
PackStart(_notebook);
_notebook.Show();
// TODO:
// Creare il package hippo e importare questa routine.
/*
# FIXME improve gtk.Notebook and do this in the theme
self._separator = hippo.Canvas()
box = hippo.CanvasBox(
border_color=style.COLOR_BUTTON_GREY.get_int(),
background_color=style.COLOR_PANEL_GREY.get_int(),
box_height=style.TOOLBOX_SEPARATOR_HEIGHT,
border_bottom=style.LINE_WIDTH)
self._separator.set_root(box)
self.pack_start(self._separator, False)
self._notebook.connect('notify::page', self._notify_page_cb)
*/
}
示例3: PreferencesDialog
// Entry sipServerAddressEntry;
// Entry sipUsernameEntry;
// Entry sipPasswordEntry;
public PreferencesDialog()
: base()
{
SetDefaultSize (600, 600);
WindowPosition = WindowPosition.Center;
IconName = "rtc";
HasSeparator = false;
BorderWidth = 5;
Resizable = true;
Title = Catalog.GetString ("Banter Preferences");
VBox.Spacing = 5;
ActionArea.Layout = ButtonBoxStyle.End;
// Notebook Tabs (General, Messages)...
Gtk.Notebook notebook = new Notebook ();
notebook.TabPos = PositionType.Top;
notebook.BorderWidth = 5;
notebook.Show ();
// notebook.AppendPage (MakeGeneralPage (),
// new Label (Catalog.GetString ("General")));
notebook.AppendPage (MakeAccountsPage (),
new Label (Catalog.GetString ("Accounts")));
notebook.AppendPage (MakeMessagesPage (),
new Label (Catalog.GetString ("Messages")));
VBox.PackStart (notebook, true, true, 0);
// Close button...
Button button = new Button (Stock.Close);
button.CanDefault = true;
button.Show ();
AccelGroup accelGroup = new AccelGroup ();
AddAccelGroup (accelGroup);
button.AddAccelerator ("activate",
accelGroup,
(uint) Gdk.Key.Escape,
0,
0);
AddActionWidget (button, ResponseType.Close);
DefaultResponse = ResponseType.Close;
Realized += DialogRealized;
Preferences.PreferenceChanged += PreferenceChanged;
ShowAll ();
}
示例4: DockNotebook
public DockNotebook()
{
Child = new Notebook ();
Child.Parent = this;
((Notebook)Child).TabPos = PositionType.Bottom;
// FIXME: enable these if we do a DockTabLabel
//((Notebook)Child).SwitchPage += new SwitchPageHandler (SwitchPageCb);
//((Notebook)Child).ButtonPressEvent += new ButtonPressEvent (ButtonPressCb);
//((Notebook)Child).ButtonReleaseEvent += new ButtonReleaseEvent (ButtonReleaseCb);
((Notebook)Child).Scrollable = true;
Child.Show ();
DockObjectFlags &= ~(DockObjectFlags.Automatic);
}
示例5: NotebookPage
public NotebookPage (Page page)
{
this.page = page;
BorderWidth = 5;
Spacing = 10;
tab_widget = new Label (page.Name);
tab_widget.Show ();
Widget page_widget = page.DisplayWidget as Widget;
if (page_widget != null) {
page_widget.Show ();
PackStart (page_widget, true, true, 0);
} else {
foreach (Section section in page) {
AddSection (section);
}
if (page.ChildPages.Count > 0) {
Notebook notebook = new Notebook ();
notebook.ShowBorder = false;
notebook.ShowTabs = false;
notebook.Show ();
var hbox = new HBox () { Spacing = 6 };
// FIXME this shouldn't be hard-coded to 'Source:', but this is the only
// user of this code atm...
var page_label = new Label (Mono.Unix.Catalog.GetString ("Source:"));
var page_combo = new PageComboBox (page.ChildPages, notebook);
hbox.PackStart (page_label, false, false, 0);
hbox.PackStart (page_combo, true, true, 0);
hbox.ShowAll ();
PackStart (hbox, false, false, 0);
HSeparator sep = new HSeparator ();
sep.Show ();
PackStart (sep, false, false, 0);
foreach (Page child_page in page.ChildPages) {
NotebookPage page_ui = new NotebookPage (child_page);
page_ui.BorderWidth = 0;
page_ui.Show ();
notebook.AppendPage (page_ui, null);
}
PackStart (notebook, true, true, 0);
}
}
}
示例6: CombinedDesignView
public CombinedDesignView (IViewContent content)
{
this.content = content;
if (content is IEditableTextBuffer) {
((IEditableTextBuffer)content).CaretPositionSet += delegate {
ShowPage (0);
};
}
content.ContentChanged += new EventHandler (OnTextContentChanged);
content.DirtyChanged += new EventHandler (OnTextDirtyChanged);
notebook = new Gtk.Notebook ();
// Main notebook
notebook.TabPos = Gtk.PositionType.Bottom;
notebook.ShowTabs = false;
notebook.ShowBorder = false;
notebook.Show ();
box = new VBox ();
// Bottom toolbar
toolbar = new Toolbar ();
toolbar.IconSize = IconSize.SmallToolbar;
toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
toolbar.ShowArrow = false;
CommandRouterContainer crc = new CommandRouterContainer (content.Control, content, true);
crc.Show ();
AddButton (GettextCatalog.GetString ("Source Code"), crc).Active = true;
toolbar.ShowAll ();
box.PackStart (notebook, true, true, 0);
box.PackStart (toolbar, false, false, 0);
box.Show ();
IdeApp.Workbench.ActiveDocumentChanged += new EventHandler (OnActiveDocumentChanged);
content.Control.Realized += delegate {
if (content != null && content.WorkbenchWindow != null)
content.WorkbenchWindow.ActiveViewContent = notebook.CurrentPageWidget == content.Control ? content : this;
};
notebook.SwitchPage += delegate {
if (content != null && content.WorkbenchWindow != null)
content.WorkbenchWindow.ActiveViewContent = notebook.CurrentPageWidget == content.Control ? content : this;
};
}
示例7: StatusEntry
public StatusEntry()
{
ModifyBg (StateType.Normal, Style.Background (StateType.Active));
BorderWidth = 0;
customAvailableMessages = new SerializableDictionary<string,string> ();
customBusyMessages = new SerializableDictionary<string,string> ();
customAwayMessages = new SerializableDictionary<string,string> ();
presence = null;
potentialPresenceType = PresenceType.Offline;
notebook = new Notebook ();
notebook.ModifyBg (StateType.Normal, Style.Background (StateType.Active));
notebook.ShowTabs = false;
notebook.ShowBorder = false;
notebook.AppendPage (CreateViewWidget (), new Label ());
notebook.AppendPage (CreateEditWidget (), new Label());
notebook.Show ();
Add (notebook);
}
示例8: CreatePanelWidget
public override Widget CreatePanelWidget ()
{
HBox hbox = new HBox (false, 6);
Label label = new Label ();
label.MarkupWithMnemonic = GettextCatalog.GetString ("_Policy:");
hbox.PackStart (label, false, false, 0);
store = new ListStore (typeof (string), typeof (PolicySet));
policyCombo = new ComboBox (store);
CellRenderer renderer = new CellRendererText ();
policyCombo.PackStart (renderer, true);
policyCombo.AddAttribute (renderer, "text", 0);
label.MnemonicWidget = policyCombo;
policyCombo.RowSeparatorFunc = (TreeModel model, TreeIter iter) =>
((string) model.GetValue (iter, 0)) == "--";
hbox.PackStart (policyCombo, false, false, 0);
VBox vbox = new VBox (false, 6);
vbox.PackStart (hbox, false, false, 0);
vbox.ShowAll ();
notebook = new Notebook ();
// Get the panels for all mime types
List<string> types = new List<string> ();
types.AddRange (DesktopService.GetMimeTypeInheritanceChain (mimeType));
panelData.SectionLoaded = true;
panels = panelData.Panels;
foreach (IMimeTypePolicyOptionsPanel panel in panelData.Panels) {
panel.SetParentSection (this);
Widget child = panel.CreateMimePanelWidget ();
Label tlabel = new Label (panel.Label);
label.Show ();
child.Show ();
Alignment align = new Alignment (0.5f, 0.5f, 1f, 1f);
align.BorderWidth = 6;
align.Add (child);
align.Show ();
notebook.AppendPage (align, tlabel);
panel.LoadCurrentPolicy ();
}
notebook.Show ();
vbox.PackEnd (notebook, true, true, 0);
FillPolicies ();
policyCombo.Active = 0;
loading = false;
if (!isRoot && panelData.UseParentPolicy) {
//in this case "parent" is always first in the list
policyCombo.Active = 0;
notebook.Sensitive = false;
} else {
UpdateSelectedNamedPolicy ();
}
policyCombo.Changed += HandlePolicyComboChanged;
return vbox;
}
示例9: FullScreenView
public FullScreenView (IBrowsableCollection collection) : base ("Full Screen Mode")
{
Name = "FullscreenContainer";
try {
//scroll = new Gtk.ScrolledWindow (null, null);
actions = new ActionGroup ("joe");
actions.Add (new ActionEntry [] {
new ActionEntry (HideToolbar, Stock.Close,
Catalog.GetString ("Hide"),
null,
Catalog.GetString ("Hide Toolbar"),
HideToolbarAction),
new ActionEntry (ExitFullScreen,
"f-spot-view-restore",
Catalog.GetString ("Exit fullscreen"),
null,
null,
ExitAction),
new ActionEntry (SlideShow,
"f-spot-slideshow",
Catalog.GetString ("Slideshow"),
null,
Catalog.GetString ("Start slideshow"),
SlideShowAction),
});
actions.Add (new ToggleActionEntry [] {
new ToggleActionEntry (Info,
Stock.Info,
Catalog.GetString ("Info"),
null,
Catalog.GetString ("Image Information"),
InfoAction,
false)
});
new Fader (this, 1.0, 3);
notebook = new Notebook ();
notebook.ShowBorder = false;
notebook.ShowTabs = false;
notebook.Show ();
scroll = new ScrolledView ();
view = new PhotoImageView (collection);
// FIXME this should be handled by the new style setting code
view.ModifyBg (Gtk.StateType.Normal, this.Style.Black);
view.PointerMode = ImageView.PointerModeType.Scroll;
this.Add (notebook);
view.Show ();
view.MotionNotifyEvent += HandleViewMotion;
Action rotate_left = new RotateLeftAction (view.Item);
actions.Add (rotate_left);
Action rotate_right = new RotateRightAction (view.Item);
actions.Add (rotate_right);
scroll.ScrolledWindow.Add (view);
HBox hhbox = new HBox ();
hhbox.PackEnd (GetButton (HideToolbar), false, true, 0);
hhbox.PackEnd (GetButton (Info), false, true, 0);
hhbox.PackStart (GetButton (ExitFullScreen, true), false, false, 0);
hhbox.PackStart (Add (new PreviousPictureAction (view.Item)), false, false, 0);
hhbox.PackStart (GetButton (SlideShow), false, true, 0);
hhbox.PackStart (Add (new NextPictureAction (view.Item)), false, false, 0);
//hhbox.PackStart (Add (new AutoColor (view.Item)), false, false, 0);
display = new TextureDisplay (view.Item);
display.AddEvents ((int) (Gdk.EventMask.PointerMotionMask));
display.ModifyBg (Gtk.StateType.Normal, this.Style.Black);
display.MotionNotifyEvent += HandleViewMotion;
Label effect = new Label (Catalog.GetString ("Slide transition: "));
hhbox.PackStart (effect, false, false, 5);
hhbox.PackStart (display.GetCombo (), false, false, 0);
display.Show ();
hhbox.PackStart (Add (new RotateLeftAction (view.Item)), false, false, 0);
hhbox.PackStart (Add (new RotateRightAction (view.Item)), false, false, 0);
hhbox.BorderWidth = 15;
tag_view = new TagView ();
hhbox.PackStart (tag_view, false, false, 0);
//display = new ImageDisplay (view.Item);
notebook.AppendPage (scroll, null);
notebook.AppendPage (display, null);
hhbox.ShowAll ();
//scroll.ShowControls ();
scroll.Show ();
this.Decorated = false;
this.Fullscreen ();
this.ButtonPressEvent += HandleButtonPressEvent;
view.Item.Changed += HandleItemChanged;
view.GrabFocus ();
//.........这里部分代码省略.........
示例10: CheckCreateSubViewContents
void CheckCreateSubViewContents ()
{
if (subViewContents != null)
return;
subViewContents = new List<IAttachableViewContent> ();
box.Remove (this.ViewContent.Control);
subViewNotebook = new Notebook ();
subViewNotebook.TabPos = PositionType.Bottom;
subViewNotebook.ShowTabs = false;
subViewNotebook.ShowBorder = false;
subViewNotebook.Show ();
subViewNotebook.SwitchPage += subViewNotebookIndexChanged;
//add existing ViewContent
AddButton (this.ViewContent.TabPageLabel, this.ViewContent.Control).Active = true;
//pack them in a box
box.PackStart (subViewNotebook, true, true, 0);
box.ShowAll ();
}
示例11: Init
private void Init()
{
Logger.Debug("Called Preferences Init");
this.Icon = Utilities.GetIcon ("tasque", 16);
// Update the window title
this.Title = string.Format (Catalog.GetString ("Tasque Preferences"));
this.VBox.Spacing = 0;
this.VBox.BorderWidth = 0;
this.Resizable = false;
this.AddButton(Stock.Close, Gtk.ResponseType.Ok);
this.DefaultResponse = ResponseType.Ok;
notebook = new Gtk.Notebook ();
notebook.ShowTabs = true;
//
// General Page
//
generalPage = MakeGeneralPage ();
generalPage.Show ();
generalPageId =
notebook.AppendPage (generalPage,
new Label (Catalog.GetString ("General")));
//
// Appearance Page
//
appearancePage = MakeAppearancePage ();
appearancePage.Show ();
notebook.AppendPage (appearancePage,
new Label (Catalog.GetString ("Appearance")));
//
// Backend Page
//
backendPage = null;
backendPageId = -1;
var backendType = application.BackendManager.CurrentBackend;
if (backendType != null) {
backendPage = (Widget)application.BackendManager.GetBackendPreferencesWidget ();
if (backendPage != null) {
backendPage.Show ();
var l = new Label (GLib.Markup.EscapeText (
application.BackendManager.AvailableBackends [backendType]));
l.UseMarkup = false;
l.UseUnderline = false;
l.Show ();
backendPageId = notebook.AppendPage (backendPage, l);
}
}
notebook.Show ();
this.VBox.PackStart (notebook, true, true, 0);
DeleteEvent += WindowDeleted;
}
示例12: FullScreenView
public FullScreenView(IBrowsableCollection collection, Gtk.Window parent)
: base("Full Screen Mode")
{
//going fullscreen on the same screen the parent window
Gdk.Screen screen = Screen;
int monitor = screen.GetMonitorAtWindow (parent.GdkWindow);
Gdk.Rectangle bounds = screen.GetMonitorGeometry (monitor);
Move (bounds.X, bounds.Y);
string style = "style \"test\" {\n" +
"GtkToolbar::shadow_type = GTK_SHADOW_NONE\n" +
"}\n" +
"class \"GtkToolbar\" style \"test\"";
Gtk.Rc.ParseString (style);
Name = "FullscreenContainer";
try {
//scroll = new Gtk.ScrolledWindow (null, null);
actions = new ActionGroup ("joe");
actions.Add (new ActionEntry [] {
new ActionEntry (HideToolbar, Stock.Close,
Catalog.GetString ("Hide"),
null,
Catalog.GetString ("Hide toolbar"),
HideToolbarAction)});
actions.Add (new ToggleActionEntry [] {
new ToggleActionEntry (Info,
Stock.Info,
Catalog.GetString ("Info"),
null,
Catalog.GetString ("Image information"),
InfoAction,
false)});
Gtk.Action exit_full_screen = new Gtk.Action (ExitFullScreen,
Catalog.GetString ("Exit fullscreen"),
null,
null);
exit_full_screen.IconName = "view-restore";
exit_full_screen.Activated += ExitAction;
actions.Add (exit_full_screen);
Gtk.Action slide_show = new Gtk.Action (SlideShow,
Catalog.GetString ("Slideshow"),
Catalog.GetString ("Start slideshow"),
null);
slide_show.IconName = "media-playback-start";
slide_show.Activated += SlideShowAction;
actions.Add (slide_show);
new WindowOpacityFader (this, 1.0, 600);
notebook = new Notebook ();
notebook.ShowBorder = false;
notebook.ShowTabs = false;
notebook.Show ();
scroll = new ScrolledView ();
scroll.ScrolledWindow.SetPolicy (PolicyType.Never, PolicyType.Never);
view = new PhotoImageView (collection);
// FIXME this should be handled by the new style setting code
view.ModifyBg (Gtk.StateType.Normal, this.Style.Black);
this.Add (notebook);
view.Show ();
view.MotionNotifyEvent += HandleViewMotion;
view.PointerMode = PointerMode.Scroll;
scroll.ScrolledWindow.Add (view);
Toolbar tbar = new Toolbar ();
tbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
tbar.ShowArrow = false;
tbar.BorderWidth = 15;
ToolItem t_item = (actions [ExitFullScreen]).CreateToolItem () as ToolItem;
t_item.IsImportant = true;
tbar.Insert (t_item, -1);
Gtk.Action action = new PreviousPictureAction (view.Item);
actions.Add (action);
tbar.Insert (action.CreateToolItem () as ToolItem, -1);
play_pause_button = (actions [SlideShow]).CreateToolItem () as ToolButton;
tbar.Insert (play_pause_button, -1);
action = new NextPictureAction (view.Item);
actions.Add (action);
tbar.Insert (action.CreateToolItem () as ToolItem, -1);
t_item = new ToolItem ();
t_item.Child = new Label (Catalog.GetString ("Slide transition:"));
tbar.Insert (t_item, -1);
display = new SlideShow (view.Item);
display.AddEvents ((int) (Gdk.EventMask.PointerMotionMask));
display.ModifyBg (Gtk.StateType.Normal, this.Style.Black);
display.MotionNotifyEvent += HandleViewMotion;
//.........这里部分代码省略.........
示例13: PreferencesDialog
public PreferencesDialog (NoteManager manager) : base(Gtk.WindowType.Toplevel)
{
this.addin_manager = manager.AddinManager;
IconName = "tomboy";
BorderWidth = 5;
Resizable = true;
Title = Catalog.GetString ("Tomboy Preferences");
WindowPosition = WindowPosition.Center;
addin_prefs_dialogs = new Dictionary<string, Gtk.Dialog> ();
addin_info_dialogs = new Dictionary<string, Gtk.Dialog> ();
// Notebook Tabs (Editing, Hotkeys)...
Gtk.Notebook notebook = new Gtk.Notebook ();
notebook.TabPos = Gtk.PositionType.Top;
notebook.Show ();
notebook.AppendPage (MakeEditingPane (), new Gtk.Label (Catalog.GetString ("Editing")));
if (!(Services.Keybinder is NullKeybinder))
notebook.AppendPage (MakeHotkeysPane (), new Gtk.Label (Catalog.GetString ("Hotkeys")));
notebook.AppendPage (MakeSyncPane (), new Gtk.Label (Catalog.GetString ("Synchronization")));
notebook.AppendPage (MakeAddinsPane (), new Gtk.Label (Catalog.GetString ("Add-ins")));
// TODO: Figure out a way to have these be placed in a specific order
foreach (PreferenceTabAddin tabAddin in addin_manager.GetPreferenceTabAddins ()) {
Logger.Debug ("Adding preference tab addin: {0}", tabAddin.GetType ().Name);
try {
string tabName;
Gtk.Widget tabWidget;
if (tabAddin.GetPreferenceTabWidget (this, out tabName, out tabWidget) == true) {
notebook.AppendPage (tabWidget, new Gtk.Label (tabName));
}
} catch (Exception e) {
Logger.Warn ("Problems adding preferences tab addin: {0}", tabAddin.GetType ().Name);
Logger.Debug ("{0}:\n{1}", e.Message, e.StackTrace);
}
}
Gtk.VBox VBox = new Gtk.VBox ();
VBox.PackStart (notebook, true, true, 0);
addin_manager.ApplicationAddinListChanged += OnAppAddinListChanged;
// Close Button
Gtk.Button button = new Gtk.Button (Gtk.Stock.Close);
button.CanDefault = true;
button.Label = "Close";
button.Clicked += OnClickedClose;
VBox.Add (button);
button.Show ();
Gtk.AccelGroup accel_group = new Gtk.AccelGroup ();
AddAccelGroup (accel_group);
button.AddAccelerator ("activate", accel_group, (uint)Gdk.Key.Escape, 0, 0);
this.Add (VBox);
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.Show ();
Preferences.SettingChanged += HandlePreferencesSettingChanged;
}
示例14: ConstructUI
Notebook ConstructUI()
{
Notebook notebook = new Notebook ();
notebook.Show ();
Widget child;
child = ConstructItemsUI ();
if (child != null)
notebook.AppendPage (child, new Label ("Items"));
child = ConstructLayoutsUI ();
if (child != null)
notebook.AppendPage (child, new Label ("Layouts"));
notebook.CurrentPage = 0;
return notebook;
}
示例15: BuildDialog
private void BuildDialog()
{
SetDefaultSize (-1, 400);
AddDefaultCloseButton ();
if (service.Count > 1) {
notebook = new Notebook ();
notebook.Show ();
VBox.PackStart (notebook, true, true, 0);
}
}