mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
* Applied patch from Alberto Fernandez with the following changes... Finished ProgressBar (Events?) Finished HScrollBar VScrollBar and ScrollBar Finished FolderBrowserDialog Base ComboBox Added DrawMode.cs Added ComboBoxStyle.cs Added Appearance.cs Added CheckState.cs Added TabAlignment Added TabAppearance.cs Added TabDrawMode.cs Added TabSizeMode.cs Added Panel.cs Added TabPage.cs Added TabControl.cs Added Cursors.cs Added MessageBoxDefaultButton.cs Added MessageBoxIcon.cs Added MessageBoxOptions.cs Changes in MessageBoxButtons.cs (Added values) Changes in MessageBox (Completed all functions, added return values). "Finished" CheckBox.cs "Finished" ComboBox.cs "Finished" RadioButton "Finished" GroupBox "Finished" Panel Changes in Form to work with new RadioButton. Fix double Click reported on MenuItems. "Finished" Application svn path=/trunk/mcs/; revision=22123
92 lines
1.8 KiB
C#
92 lines
1.8 KiB
C#
//
|
|
// System.Windows.Forms.MainMenu
|
|
//
|
|
// Author:
|
|
// Alberto Fernandez ([email protected])
|
|
//
|
|
|
|
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace System.Windows.Forms{
|
|
|
|
public class MainMenu:Menu{
|
|
private RightToLeft rightToLeft = RightToLeft.Inherit;
|
|
private Form ownerForm;
|
|
|
|
public MainMenu ():base (null){
|
|
}
|
|
public MainMenu (MenuItem[]items):base (items){
|
|
}
|
|
|
|
[MonoTODO]
|
|
public virtual RightToLeft RightToLeft {
|
|
get{
|
|
if(rightToLeft != RightToLeft.Inherit){
|
|
return rightToLeft;
|
|
}
|
|
else if(ownerForm != null){
|
|
return ownerForm.RightToLeft;
|
|
}
|
|
else{
|
|
return RightToLeft.No;
|
|
}
|
|
}
|
|
set{
|
|
if (!Enum.IsDefined (typeof(RightToLeft), value)){
|
|
throw new InvalidEnumArgumentException();
|
|
}
|
|
if(rightToLeft != value){
|
|
rightToLeft = value;
|
|
}
|
|
}
|
|
}
|
|
[MonoTODO]
|
|
public virtual MainMenu CloneMenu (){
|
|
throw new NotImplementedException ();
|
|
}
|
|
[MonoTODO]
|
|
protected virtual IntPtr CreateMenuHandle (){
|
|
return IntPtr.Zero;
|
|
}
|
|
[MonoTODO]
|
|
protected override void Dispose (bool disposing){
|
|
base.Dispose (disposing);
|
|
}
|
|
public virtual Form GetForm (){
|
|
return ownerForm;
|
|
}
|
|
[MonoTODO]
|
|
public override String ToString (){
|
|
if (ownerForm != null){
|
|
return base.ToString () + ", GetForm: " +
|
|
ownerForm.ToString ();
|
|
}
|
|
return base.ToString ();
|
|
}
|
|
|
|
|
|
|
|
[MonoTODO]
|
|
internal void AddToForm (Form form){
|
|
ownerForm = form;
|
|
}
|
|
[MonoTODO]
|
|
internal void RemoveFromForm (){
|
|
ownerForm = null;
|
|
}
|
|
|
|
internal override Gtk.Widget CreateWidget(){
|
|
Gtk.MenuBar mb = new Gtk.MenuBar();
|
|
return mb;
|
|
}
|
|
|
|
internal override void OnNewMenuItemAdd (MenuItem item){
|
|
((Gtk.MenuBar)Widget).Append (item.Widget);
|
|
}
|
|
internal override void OnRemoveMenuItem (MenuItem item){
|
|
((Gtk.MenuBar)Widget).Remove (item.Widget);
|
|
}
|
|
}
|
|
}
|