(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / MainMenu.cs
blob850781b9935f124008fd9e85390f9405a1a5d79c
1 //
2 // System.Windows.Forms.MainMenu
3 //
4 // Author:
5 // Alberto Fernandez (infjaf00@yahoo.es)
6 //
8 using System;
9 using System.ComponentModel;
11 namespace System.Windows.Forms{
13 public class MainMenu:Menu{
14 private RightToLeft rightToLeft = RightToLeft.Inherit;
15 private Form ownerForm;
17 public MainMenu ():base (null){
19 public MainMenu (MenuItem[]items):base (items){
22 [MonoTODO]
23 public virtual RightToLeft RightToLeft {
24 get{
25 if(rightToLeft != RightToLeft.Inherit){
26 return rightToLeft;
28 else if(ownerForm != null){
29 return ownerForm.RightToLeft;
31 else{
32 return RightToLeft.No;
35 set{
36 if (!Enum.IsDefined (typeof(RightToLeft), value)){
37 throw new InvalidEnumArgumentException();
39 if(rightToLeft != value){
40 rightToLeft = value;
44 [MonoTODO]
45 public virtual MainMenu CloneMenu (){
46 throw new NotImplementedException ();
48 [MonoTODO]
49 protected virtual IntPtr CreateMenuHandle (){
50 return IntPtr.Zero;
52 [MonoTODO]
53 protected override void Dispose (bool disposing){
54 base.Dispose (disposing);
56 public virtual Form GetForm (){
57 return ownerForm;
59 [MonoTODO]
60 public override String ToString (){
61 if (ownerForm != null){
62 return base.ToString () + ", GetForm: " +
63 ownerForm.ToString ();
65 return base.ToString ();
70 [MonoTODO]
71 internal void AddToForm (Form form){
72 ownerForm = form;
74 [MonoTODO]
75 internal void RemoveFromForm (){
76 ownerForm = null;
79 internal override Gtk.Widget CreateWidget(){
80 Gtk.MenuBar mb = new Gtk.MenuBar();
81 return mb;
84 internal override void OnNewMenuItemAdd (MenuItem item){
85 ((Gtk.MenuBar)Widget).Append (item.Widget);
87 internal override void OnRemoveMenuItem (MenuItem item){
88 ((Gtk.MenuBar)Widget).Remove (item.Widget);