| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // System.Windows.Forms.MainMenu
- //
- // Author:
- // Joel Basson ([email protected])
- //
- //
- using System.Drawing;
- namespace System.Windows.Forms{
- public class MainMenu : Control{
- public MenuItemCollection MenuItems;
- String text;
- internal Gtk.MenuBar mb;
- public class MenuItemCollection{
- MainMenu owner;
- public MenuItemCollection (MainMenu owner) {
-
- this.owner = owner;
- }
- public void Add (MenuItem item) {
- owner.mb.Append (item.file_item);
-
- }
- public void AddRange(MenuItem[] items) {
-
- foreach (MenuItem m in items)
- {owner.mb.Append (m.file_item);}
-
- }
- }
- public MainMenu() : base (){
- this.MenuItems = new MenuItemCollection(this);
- CreateMenuBar();
- }
- internal override Gtk.Widget CreateWidget () {
- return mb;
- }
-
- private void CreateMenuBar (){
-
- mb = new Gtk.MenuBar ();
-
- }
- }
- }
|