ieditor/menubar.h
00001 /* 00002 Copyright (C) 2011 by Jelle Hellemans 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __IEDITOR_MENUBAR_H__ 00020 #define __IEDITOR_MENUBAR_H__ 00021 00022 #include <csutil/scf.h> 00023 #include <csutil/scf_implementation.h> 00024 00025 #include <wx/string.h> 00026 00027 class wxMenuBar; 00028 class wxMenuItem; 00029 00030 namespace CS { 00031 namespace EditorApp { 00032 00033 struct iMenuItem; 00034 00038 struct iMenuItemEventListener : public virtual iBase 00039 { 00040 SCF_INTERFACE (iMenuItemEventListener, 0, 0, 1); 00041 00043 virtual void OnClick (iMenuItem*) = 0; 00044 }; 00045 00046 00053 struct iMenuItem : public virtual iBase 00054 { 00055 SCF_INTERFACE (iMenuItem, 0, 0, 1); 00056 00058 virtual wxMenuItem* GetwxMenuItem () const = 0; 00059 00060 virtual void AddListener (iMenuItemEventListener*) = 0; 00061 virtual void RemoveListener (iMenuItemEventListener*) = 0; 00062 }; 00063 00070 struct iMenuCheckItem : public iMenuItem 00071 { 00072 SCF_INTERFACE (iMenuCheckItem, 0, 0, 1); 00073 00074 virtual bool IsChecked () const = 0; 00075 00076 virtual void Check (bool) = 0; 00077 }; 00078 00085 struct iMenu : public virtual iBase 00086 { 00087 SCF_INTERFACE (iMenu, 0, 0, 1); 00088 00090 virtual wxMenu* GetwxMenu () const = 0; 00091 00092 virtual csPtr<iMenuItem> AppendItem (const char* item) = 0; 00093 virtual csPtr<iMenuCheckItem> AppendCheckItem (const char* item) = 0; 00094 virtual csPtr<iMenuItem> AppendSeparator () = 0; 00095 virtual csPtr<iMenu> AppendSubMenu (const char* item) = 0; 00096 }; 00097 00098 00102 struct iMenuBar : public virtual iBase 00103 { 00104 SCF_INTERFACE (iMenuBar, 0, 0, 1); 00105 00107 virtual wxMenuBar* GetwxMenuBar () const = 0; 00108 00109 virtual csPtr<iMenu> Append (const char* item) = 0; 00110 }; 00111 00112 } // namespace EditorApp 00113 } // namespace CS 00114 00115 #endif
Generated for Crystal Space 2.1 by doxygen 1.6.1
