From 00acb32df1c877fa775fe8b81f27a078bcab35e5 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Thu, 1 Jul 2004 02:12:04 +0000 Subject: [PATCH] Contributions from jaspervp@gmx.net svn path=/trunk/gtk-sharp/; revision=30599 --- doc/en/Gtk/MenuBar.xml | 38 +++++++++++++++++ doc/en/Gtk/MenuItem.xml | 11 +++++ doc/en/Gtk/Notebook.xml | 93 +++++++++++++++++++++-------------------- doc/en/Gtk/Tree.xml | 2 +- 4 files changed, 97 insertions(+), 47 deletions(-) diff --git a/doc/en/Gtk/MenuBar.xml b/doc/en/Gtk/MenuBar.xml index 6d59d792a..98f734565 100644 --- a/doc/en/Gtk/MenuBar.xml +++ b/doc/en/Gtk/MenuBar.xml @@ -15,6 +15,44 @@ The result is a standard menu bar which can hold many menu items. allows for a shadow type to be set for aesthetic purposes. + + + + using System; + using Gtk; + + public class MenuApp { + + public static void Main (string[] args) + { + new MenuApp(); + } + + public MenuApp(){ + Application.Init(); + Window win = new Window ("Menu Sample App"); + MenuBar mb = new MenuBar (); + Menu file_menu = new Menu (); + MenuItem exit_item = new MenuItem("Exit"); + exit_item.Activated += new EventHandler (on_exit_item_activate); + file_menu.Append (exit_item); + MenuItem file_item = new MenuItem("File"); + file_item.Submenu = file_menu; + mb.Append (file_item); + win.Add (mb); + win.ShowAll (); + Application.Run (); + } + + + + public void on_exit_item_activate(object o, EventArgs args) + { + Application.Quit (); + } + + + diff --git a/doc/en/Gtk/MenuItem.xml b/doc/en/Gtk/MenuItem.xml index 01c731b2f..4f1340395 100644 --- a/doc/en/Gtk/MenuItem.xml +++ b/doc/en/Gtk/MenuItem.xml @@ -13,6 +13,17 @@ A widget used for items in menus. The and derived widgets are the only valid children for menus. Their function is to correctly handle highlighting, alignment, events and submenus. + + + MenuBar mb = new MenuBar (); + Menu file_menu = new Menu (); + MenuItem exit_item = new MenuItem("Exit"); + file_menu.Append (exit_item); + MenuItem file_item = new MenuItem("File"); + file_item.Submenu = file_menu; + mb.Append (file_item); + + diff --git a/doc/en/Gtk/Notebook.xml b/doc/en/Gtk/Notebook.xml index a9741e543..3e8d83a14 100644 --- a/doc/en/Gtk/Notebook.xml +++ b/doc/en/Gtk/Notebook.xml @@ -542,10 +542,11 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + The index of the curent page. + + the index of the page to switch to. + Returns the index of the current page . + The index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned. @@ -557,10 +558,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Indicates if scroll arrows are added if there are too many tabs. + a Boolean value to select if scroll arrows are added or not. + Returns true if arrows are added and false if not. + Default is false. @@ -572,10 +573,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Indicates if the tabs are shown. + a Boolean value to select if the tabs are shown or not. + Returns true if the tabs are shown and false if not. + Default value is true. @@ -587,10 +588,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Indicates if the border is shown. + a Boolean value to select if the border should be shown or not. + Returns true if the border is shown and false if not. + Default value is true. @@ -602,10 +603,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Sets or obtains yhe width of the horizontal border arround the tabs. + a uint value to select the horizontal width of the border. + Returns the horizontal width of the border. + Default value is 2. @@ -617,10 +618,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Indicates if all the tabs have the same size. + Selects if the tabs have the same size or not. + Returns a boolean to indicate if the tabs have the same size or not. + True if the tabs have the same size and false if not. Default is false. @@ -632,10 +633,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Sets or obtains the width of the vertical border arround the tabs. + a uint value to select the vertical width of the border. + Returns the vertical width of the border. + Default value is 2. @@ -647,10 +648,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Sets the width of the border arround the tabs.. + a uint value to select the width of the border. + + Default value is 2. This is a easy the change and at the same time. Use those properties to read the width. @@ -662,10 +663,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + The index of the curent page. + The index of the page to switch to. + Returns the index of the curent page. + use instead. @@ -677,10 +678,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + Sets or obtains The position of the tabs. + The new . + the of this notebook. + default is top. @@ -692,10 +693,10 @@ class NotebookSample - To be added - an object of type - an object of type - To be added + enables the popup menu. + Use true to enable and false to disable. + Returns true if the popup menu is enabled and false if not. + if true and the user clicks with the right mouse button on the tabs, a menu with all the pages will be popped up. @@ -823,9 +824,9 @@ class NotebookSample System.Int32 - To be added + returns the amount of pages in this notebook. a - To be added + returns the amount of pages in this noteboo diff --git a/doc/en/Gtk/Tree.xml b/doc/en/Gtk/Tree.xml index 31732a313..a516d7990 100644 --- a/doc/en/Gtk/Tree.xml +++ b/doc/en/Gtk/Tree.xml @@ -13,7 +13,7 @@ A tree . - is deprecated and unsupported. It is known to be buggy. To use it, you must define the symbol prior to includng the Gtk# header files. Use instead. + is deprecated and unsupported. It is known to be buggy. To use it, you must define the symbol prior to includng the Gtk# header files. Use instead. The widget is a container that shows users a list of items, in a tree format complete withbranches and leafnodes. Branches can be expanded to show their child items, or collapsed to hide them.