本文整理汇总了C#中Gtk.Notebook类的典型用法代码示例。如果您正苦于以下问题:C# Notebook类的具体用法?C# Notebook怎么用?C# Notebook使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Notebook类属于Gtk命名空间,在下文中一共展示了Notebook类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MphotoToplevel
public unsafe MphotoToplevel (IImageRepository _repo, string[] args, params object[] props)
: base ("Mphoto", "0.0", Modules.UI, args, props)
{
cwh = new Glade.XMLCustomWidgetHandler (GladeCustomWidgetHandler);
Glade.XML.SetCustomHandler (cwh);
gxml = new Glade.XML (null, "mphoto.glade", null, null);
Console.WriteLine ("Autoconnect");
gxml.Autoconnect (this);
// CreateCustomWidget ("browser_icon_list");
// CreateCustomWidget ("collections_tree_view");
// CreateCustomWidget ("imageinfo_tree_view");
// CreateCustomWidget ("eog_image_view");
// CreateCustomWidget ("keywords_widget");
this.leftside_notebook = (Gtk.Notebook) gxml["browser_left_notebook"];
this.top_level_notebook = (Gtk.Notebook) gxml["top_level_notebook"];
this.toplevel = gxml["mphoto_browser"];
this.label_zoom_value = (Gtk.Label) gxml["label_zoom_value"];
this.search_dialog = (Gtk.Window) gxml["search_dialog"];
this.Repository = _repo;
// initialize the tree views to the side
imageinfo_tree_view.IconList = icon_list;
keywords_widget.IconList = icon_list;
collections_tree_view.RowActivated += new RowActivatedHandler (CollectionsTreeViewActivateHandler);
icon_list.Activated += new EventHandler (IconlistActivated);
GlobalMphotoToplevel = this;
}
开发者ID:emtees,项目名称:old-code,代码行数:34,代码来源:MphotoToplevel.cs
示例2: CommonAboutDialog
public CommonAboutDialog()
{
Title = MainClass.Languages.Translate("moscrif_ide_title_f1");
TransientFor = MainClass.MainWindow;
AllowGrow = false;
HasSeparator = false;
Modal = true;
VBox.BorderWidth = 0;
aboutPictureScrollBox = new ScrollBox();
VBox.PackStart(aboutPictureScrollBox, false, false, 0);
Notebook notebook = new Notebook();
notebook.BorderWidth = 6;
notebook.AppendPage(new AboutTabPage(), new Label(Title));
notebook.AppendPage(new VersionInformationTabPage(), new Label(MainClass.Languages.Translate("components")));
var buildInfo = LoadBuildInfo();
if (buildInfo != null)
notebook.AppendPage(buildInfo, new Label(MainClass.Languages.Translate("components")));
VBox.PackStart(notebook, true, true, 4);
AddButton (Stock.Close, ResponseType.Close);
//ShowAll();
}
开发者ID:moscrif,项目名称:ide,代码行数:27,代码来源:CommonAboutDialog.cs
示例3: 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)
*/
}
开发者ID:mauroguardarini,项目名称:sugar-sharp,代码行数:27,代码来源:Toolbox.cs
示例4: ViewEditorDialog
public ViewEditorDialog (ISchemaProvider schemaProvider, bool create, ViewEditorSettings settings)
{
if (schemaProvider == null)
throw new ArgumentNullException ("schemaProvider");
this.schemaProvider = schemaProvider;
this.action = create ? SchemaActions.Create : SchemaActions.Alter;
this.Build();
if (create)
Title = AddinCatalog.GetString ("Create View");
else
Title = AddinCatalog.GetString ("Alter View");
notebook = new Notebook ();
sqlEditor = new SqlEditorWidget ();
sqlEditor.TextChanged += new EventHandler (SqlChanged);
notebook.AppendPage (sqlEditor, new Label (AddinCatalog.GetString ("Definition")));
if (settings.ShowComment) {
commentEditor = new CommentEditorWidget ();
notebook.AppendPage (commentEditor, new Label (AddinCatalog.GetString ("Comment")));
}
notebook.Page = 0;
entryName.Text = view.Name;
vboxContent.PackStart (notebook, true, true, 0);
vboxContent.ShowAll ();
SetWarning (null);
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:35,代码来源:ViewEditorDialog.cs
示例5: 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);
}
开发者ID:BackupTheBerlios,项目名称:sofia-svn,代码行数:29,代码来源:GtkGui.cs
示例6: WorkbenchView
public WorkbenchView(WorkbenchController controller)
{
SplashWindow.Update ("Creating GUI");
XML gxml = new Glade.XML (null,
WorkbenchSingleton.GLADEFILE,
"Workbench",
null);
window = (Gtk.Window) gxml["Workbench"];
Gtk.VPaned splitter = (Gtk.VPaned) gxml["mainPane"];
editorNotebook = new EditorNotebook ();
splitter.Pack1 (editorNotebook, true, false);
ScrolledWindow sw = new ScrolledWindow ();
console = new TextView ();
console.Editable = false;
console.WrapMode = WrapMode.Word;
sw.Add (console);
Notebook bottomNotebook = new Notebook ();
bottomNotebook.AppendPage (sw, new Label ("Console"));
splitter.Pack2 (bottomNotebook, true, false);
window.Icon = icon;
this.WindowTitle = "";
gxml.Autoconnect (controller);
bottomNotebook.ShowAll ();
editorNotebook.ShowAll ();
SplashWindow.Update ("Simetron is ready!");
}
开发者ID:BackupTheBerlios,项目名称:simetron,代码行数:31,代码来源:WorkbenchView.cs
示例7: PageComboBox
public PageComboBox (IList<Page> pages, Notebook notebook)
{
this.pages = pages;
this.notebook = notebook;
// icon, name, order, Page object itself
model = new ListStore (typeof(Gdk.Pixbuf), typeof(string), typeof(int), typeof(Page));
model.SetSortColumnId (2, SortType.Ascending);
Model = model;
CellRendererPixbuf icon = new CellRendererPixbuf ();
PackStart (icon, false);
AddAttribute (icon, "pixbuf", 0);
CellRendererText name = new CellRendererText ();
PackStart (name, true);
AddAttribute (name, "markup", 1);
foreach (Page page in pages) {
model.AppendValues (
Banshee.Gui.IconThemeUtils.LoadIcon (page.IconName, 22),
String.Format ("<b>{0}</b>", page.Name),
page.Order,
page
);
}
Active = 0;
Show ();
}
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:30,代码来源:PageComboBox.cs
示例8: TabbedSkin
public TabbedSkin(BasilProject project, ITaskBuilder taskBuilder)
{
_project = project;
_tabsToTools = new System.Collections.Hashtable();
window = new Gtk.Window ("WeSay");
window.SetDefaultSize (600, 400);
window.DeleteEvent += new DeleteEventHandler (WindowDelete);
HBox hbox = new HBox (false, 0);
window.Add (hbox);
Notebook notebook = new Notebook ();
notebook.SwitchPage += new SwitchPageHandler(OnNotebookSwitchPage);
hbox.PackStart(notebook, true, true, 0);
foreach (ITask t in taskBuilder.Tasks)
{
VBox container = new VBox();
t.Container = container;
int i = notebook.AppendPage(container, new Label(t.Label));
_tabsToTools.Add(i, t);
}
window.ShowAll ();
}
开发者ID:bbriggs,项目名称:wesay,代码行数:25,代码来源:TabbedSkin.cs
示例9: UnitForm
//------------------------------------------------------------------------------
public UnitForm(string file_name)
{
instance = new Notebook ();
UnitEditor.RenderablesList renderables_list = new UnitEditor.RenderablesList (file_name);
instance.AppendPage (renderables_list, new Label("Renderables"));
}
开发者ID:Narinyir,项目名称:crown-tools,代码行数:8,代码来源:UnitForm.cs
示例10: SdiWorkspaceWindow
public SdiWorkspaceWindow (DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel) : base ()
{
this.workbench = workbench;
this.tabControl = tabControl;
this.content = content;
this.tabLabel = tabLabel;
this.tabPage = content.Control;
content.WorkbenchWindow = this;
content.ContentNameChanged += new EventHandler(SetTitleEvent);
content.DirtyChanged += new EventHandler(SetTitleEvent);
content.BeforeSave += new EventHandler(BeforeSave);
content.ContentChanged += new EventHandler (OnContentChanged);
ShadowType = ShadowType.None;
box = new VBox ();
box.PackStart (content.Control);
Add (box);
box.Show ();
SetTitleEvent(null, null);
commandHandler = new ViewCommandHandlers (this);
Show ();
}
开发者ID:acken,项目名称:monodevelop,代码行数:26,代码来源:SdiWorkspaceWindow.cs
示例11: DemoMain
public DemoMain ()
{
SetupDefaultIcon ();
window = new Gtk.Window ("Gtk# Code Demos");
window.SetDefaultSize (600, 400);
window.DeleteEvent += new DeleteEventHandler (WindowDelete);
HBox hbox = new HBox (false, 0);
window.Add (hbox);
treeView = CreateTree ();
hbox.PackStart (treeView, false, false, 0);
Notebook notebook = new Notebook ();
hbox.PackStart (notebook, true, true, 0);
notebook.AppendPage (CreateText (infoBuffer, false), new Label ("_Info"));
TextTag heading = new TextTag ("heading");
heading.Font = "Sans 18";
infoBuffer.TagTable.Add (heading);
notebook.AppendPage (CreateText (sourceBuffer, true), new Label ("_Source"));
window.ShowAll ();
}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:25,代码来源:DemoMain.cs
示例12: FeedPropertiesDialog
public FeedPropertiesDialog(ISource f)
: base(WindowType.Toplevel)
{
feed = f;
Title = "\""+feed.Name+"\" Properties";
Icon = feed.Favicon;
BorderWidth = 5;
DeleteEvent += OnClose;
vbox = new VBox();
vbox.Spacing = 6;
Add(vbox);
notebook = new Notebook();
vbox.PackStart(notebook, false, false, 0);
bbox = new HButtonBox();
bbox.Layout = ButtonBoxStyle.End;
vbox.PackStart(bbox, false, false, 0);
AddGeneralTab();
AddTagsTab();
AddCloseButton();
}
开发者ID:wfarr,项目名称:newskit,代码行数:25,代码来源:Summa.Gui.FeedPropertiesDialog.cs
示例13: Label
/// <summary>
/// Initializes a new instance of the <see cref="libTerminus.Label"/> class.
/// </summary>
/// <param name='_text'>
/// _text.
/// </param>
/// <param name='_nb'>
/// _nb.
/// </param>
public Label(string _text,ref Notebook _nb,Widget _widg)
{
this.Build ();
label1.Text = _text;
gnb = _nb;
widg = _widg;
}
开发者ID:squarerootfury,项目名称:terminus,代码行数:16,代码来源:Label.cs
示例14: SdiWorkspaceWindow
public SdiWorkspaceWindow (DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel) : base ()
{
this.workbench = workbench;
this.tabControl = tabControl;
this.content = content;
this.tabLabel = tabLabel;
this.tabPage = content.Control;
ShadowType = ShadowType.None;
box = new VBox ();
Add (box);
box.PackStart (content.Control);
fileTypeCondition.SetFileName (content.ContentName ?? content.UntitledName);
extensionContext = AddinManager.CreateExtensionContext ();
extensionContext.RegisterCondition ("FileType", fileTypeCondition);
content.WorkbenchWindow = this;
content.ContentNameChanged += new EventHandler(SetTitleEvent);
content.DirtyChanged += new EventHandler(SetTitleEvent);
content.BeforeSave += new EventHandler(BeforeSave);
content.ContentChanged += new EventHandler (OnContentChanged);
box.Show ();
SetTitleEvent(null, null);
commandHandler = new ViewCommandHandlers (this);
Show ();
}
开发者ID:kangaroo,项目名称:monodevelop,代码行数:31,代码来源:SdiWorkspaceWindow.cs
示例15: AboutDialog
public AboutDialog()
: base(string.Empty, PintaCore.Chrome.MainWindow, DialogFlags.Modal)
{
Title = Catalog.GetString ("About Pinta");
//TransientFor = IdeApp.Workbench.RootWindow;
AllowGrow = false;
HasSeparator = false;
Icon = PintaCore.Resources.GetIcon ("Pinta.png");
VBox.BorderWidth = 0;
aboutPictureScrollBox = new ScrollBox ();
VBox.PackStart (aboutPictureScrollBox, false, false, 0);
imageSep = PintaCore.Resources.GetIcon ("About.ImageSep.png");
VBox.PackStart (new Gtk.Image (imageSep), false, false, 0);
Notebook notebook = new Notebook ();
notebook.BorderWidth = 6;
notebook.AppendPage (new AboutPintaTabPage (), new Label (Title));
notebook.AppendPage (new VersionInformationTabPage (), new Label (Catalog.GetString ("Version Info")));
VBox.PackStart (notebook, true, true, 4);
AddButton (Gtk.Stock.Close, (int)ResponseType.Close);
ShowAll ();
}
开发者ID:jobernolte,项目名称:Pinta,代码行数:29,代码来源:AboutDialog.cs
示例16: ListPage
public ListPage(Notebook notebook, ModulesTreeInfo module)
{
this.notebook = notebook;
this.module = module;
headerbox = new HBox();
headerlabel = new Label(module.Text);
headerbox.PackStart(headerlabel);
//Image img = new Image("gtk-close", IconSize.Menu);
close_img = ImageManager.GetImage("Images.close-button.png");
//close_img = new Image("gtk-close", IconSize.Menu);
btnCloseTab = new Button(close_img);
btnCloseTab.BorderWidth = 0;
btnCloseTab.Relief = ReliefStyle.None;
//btnCloseTab.WidthRequest = 19;
//btnCloseTab.HeightRequest = 19;
btnCloseTab.Clicked += delegate { this.Dispose(); };
headerbox.PackStart(btnCloseTab);
headerbox.ShowAll();
tableview = new DataTableView(module);
this.Add(tableview);
this.ShowAll();
notebook.AppendPage(this, headerbox);
notebook.SetTabReorderable(this, true);
}
开发者ID:langpavel,项目名称:LPS-old,代码行数:27,代码来源:ListPage.cs
示例17: DemoWindow
/// <summary>
/// Constructs a demo object with the appropriate gui.
/// </summary>
public DemoWindow()
: base("Moonfire Games' Gtk Demo")
{
// Create a window
SetDefaultSize(1000, 800);
DeleteEvent += OnWindowDelete;
demoComponents = new DemoComponents();
// Create a user action manager.
var actionManager = new ActionManager(this);
actionManager.Add(GetType().Assembly);
demoConfiguratorsTab = new DemoConfiguratorsTab(this);
actionManager.Add(demoConfiguratorsTab);
demoActions = new DemoActions(actionManager);
// Load the layout from the file system.
layout = new ActionLayout(new FileInfo("ActionLayout1.xml"));
actionManager.SetLayout(layout);
// Load the keybinding from a file.
keybindings = new ActionKeybindings(new FileInfo("ActionKeybindings1.xml"));
actionManager.SetKeybindings(keybindings);
// Create the window frame
var box = new VBox();
Add(box);
// Create the components we need before the menu.
notebook = new Notebook();
actionManager.Add(new SwitchPageAction(notebook, 0, "Components"));
actionManager.Add(new SwitchPageAction(notebook, 1, "Text Editor"));
actionManager.Add(new SwitchPageAction(notebook, 2, "Actions"));
actionManager.Add(new SwitchPageAction(notebook, 3, "Configurators"));
// Create a notebook
notebook.BorderWidth = 5;
notebook.AppendPage(demoComponents, new Label("Components"));
notebook.AppendPage(demoActions, new Label("Actions"));
notebook.AppendPage(demoConfiguratorsTab, new Label("Configurators"));
// Add the status bar
statusbar = new Statusbar();
statusbar.Push(0, "Welcome!");
statusbar.HasResizeGrip = true;
// Create the menu
menubar = new MenuBar();
// Back everything into place.
box.PackStart(CreateGuiMenu(), false, false, 0);
box.PackStart(notebook, true, true, 0);
box.PackStart(statusbar, false, false, 0);
}
开发者ID:dmoonfire,项目名称:mfgames-gtkext-cil,代码行数:62,代码来源:DemoWindow.cs
示例18: SwitchPageAction
/// <summary>
/// Initializes a new instance of the <see cref="SwitchPageAction"/>
/// class and configures it to switch to the given page.
/// </summary>
/// <param name="notebook">The notebook.</param>
/// <param name="pageNumber">The page number.</param>
/// <param name="label">The label.</param>
public SwitchPageAction(
Notebook notebook,
int pageNumber,
string label)
: base("SwitchPage" + pageNumber, label)
{
this.notebook = notebook;
this.pageNumber = pageNumber;
}
开发者ID:dmoonfire,项目名称:mfgames-gtkext-cil,代码行数:16,代码来源:SwitchPageAction.cs
示例19: cPool
string g_selection; // ^ together with the path
#endregion Fields
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="libTerminus.cPool"/> class.
/// </summary>
/// <param name='_nb'>
/// _nb.
/// </param>
public cPool(ref Notebook _nb)
{
this.Build ();
cTerminus.isLibTabOpen = true;
appendColumns ();
appendItems ();
g_notebook = _nb;
treeview1.CursorChanged += HandleCursorChanged;
}
开发者ID:squarerootfury,项目名称:terminus,代码行数:21,代码来源:cPool.cs
示例20: ChatsPage
private ChatsPage()
{
base.FocusGrabbed += base_FocusGrabbed;
closePixbuf = new Gdk.Pixbuf(null, "FileFind.Meshwork.GtkClient.smallclose.png");
tabLabelPages = new Dictionary<Widget, ChatSubpageBase>();
notebook = new Notebook();
notebook.TabPos = PositionType.Bottom;
notebook.SwitchPage += notebook_SwitchPage;
notebook.PageReordered += notebook_PageReordered;
ScrolledWindow swindow = new ScrolledWindow();
swindow.HscrollbarPolicy = PolicyType.Automatic;
swindow.VscrollbarPolicy = PolicyType.Automatic;
chatList = new TreeView ();
swindow.Add(chatList);
chatTreeStore = new NetworkGroupedTreeStore<ChatRoom>(chatList);
chatList.Model = chatTreeStore;
TreeViewColumn column;
column = chatList.AppendColumn("Room Name", new CellRendererText(), new TreeCellDataFunc (NameDataFunc));
column.Expand = true;
column.Sizing = TreeViewColumnSizing.Autosize;
var pixbufCell = new CellRendererPixbuf();
column.PackStart(pixbufCell, false);
column.SetCellDataFunc(pixbufCell, new TreeCellDataFunc(RoomSecureDataFunc));
column = chatList.AppendColumn("Users", new CellRendererText(), new TreeCellDataFunc (RoomUsersDataFunc));
column.Sizing = TreeViewColumnSizing.Autosize;
chatList.RowActivated += chatList_RowActivated;
chatList.ButtonPressEvent += chatList_ButtonPressEvent;
EventBox box = new EventBox();
box.Add(new Label("Chatroom List"));
box.ButtonPressEvent += HandleTabButtonPressEvent;
box.ShowAll();
notebook.AppendPage(swindow, box);
this.PackStart(notebook, true, true, 0);
notebook.ShowAll();
foreach (Network network in Core.Networks) {
Core_NetworkAdded (network);
}
Core.NetworkAdded +=
(NetworkEventHandler)DispatchService.GuiDispatch(
new NetworkEventHandler(Core_NetworkAdded)
);
}
开发者ID:codebutler,项目名称:meshwork,代码行数:56,代码来源:ChatsPage.cs
注:本文中的Gtk.Notebook类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论