Better looking toolbar styles (especially on Windows)
[qemu-gui.git] / menubar.h
blob35955a067520794a9a62f1c1c80d79a63fc8a20b
1 #ifndef QEMU_GUI_MENUBAR_H
2 #define QEMU_GUI_MENUBAR_H
4 #include <wx/menu.h>
6 class wxMenu;
8 class QemuUIMenuBar : public wxMenuBar
10 public:
11 QemuUIMenuBar();
13 wxMenu* GetFileMenu();
14 /**
15 * Disables all vm related menu entries an gets called if when
16 * the homepage is activated.
17 */
18 void Disable();
19 void Settings(bool state);
20 void PowerOn(bool state);
21 void Pause(bool state);
22 void PowerOff(bool state);
23 void Reset(bool state);
24 /**
25 * places the exit menuitem at the end of the menu gets
26 * called after a filehistory update occured
28 void UpdateFileHistory(const size_t fileHistoryCount);
29 /**
30 * used to enable or disable toolbar related menuentries
31 * gets called when the toolbar is hidden/shown
33 void EnableToolbar(bool);
35 /**
36 * used to reflect the current state of the favorites panel
37 * gets called when the splitter is unsplit
39 void CheckFavorites(bool);
41 /**
42 * used to reflect the changes of the currently open vm's
43 * in the window menu
45 void UpdateWindowMenu(const size_t posOld,const size_t posNew);
46 void RemoveWindowMenuEntry(const size_t pos);
47 void PrependWindowMenuEntry(const wxString& title);
48 void AppendWindowMenuEntry(const wxString& title);
49 void CheckWindowMenuEntry(size_t pos);
50 /**
51 * returns the position of the currently checked menu entry
53 int GetCheckedWindowMenuEntry();
54 private:
55 wxMenu *CreateFileMenu();
56 wxMenu *CreateViewMenu();
57 wxMenu *CreateVMMenu();
58 wxMenu *CreatePowerMenu();
59 wxMenu *CreateWindowMenu();
60 wxMenu *CreateHelpMenu();
61 wxMenu *filemenu;
62 wxMenu *viewmenu;
63 wxMenu *vmmenu;
64 wxMenu *powermenu;
65 wxMenu *windowmenu;
66 wxMenu *helpmenu;
68 void InsertWindowMenuEntry(const size_t pos,const wxString& title);
71 #endif