Better looking toolbar styles (especially on Windows)
[qemu-gui.git] / notebook.h
blob3de26284e5c98d8a3043b611b1e7d4f1bc5a4500
1 #ifndef QEMU_GUI_NOTEBOOK_H
2 #define QEMU_GUI_NOTEBOOK_H
4 #include <wx/window.h>
5 #include <wx/notebook.h>
6 #include <wx/panel.h>
7 #include <wx/html/htmlwin.h>
8 #include "homepage.h"
10 //DECLARE_EVENT_TYPE(EVT_NOTEBOOK_CONTEXT_CLOSE,wxID_ANY)
12 class QemuVM;
13 class VNCPanel;
14 class ConsolePanel;
15 class wxBoxSizer;
16 class QemuUINotebookPage;
18 class QemuUINotebook : public wxNotebook
20 public:
21 QemuUINotebook(wxWindow *parent);
22 // returns the page position of the homepage
23 int ShowHomepage();
24 void CloseHomepage();
25 void CreateHomepage();
26 bool IsHomepage(const int pos);
27 bool HasHomepage();
28 void AddVM(QemuVM *);
29 QemuUINotebookPage* GetCurrentVMTab();
30 QemuVM* GetCurrentVM();
31 private:
32 void ShowContextMenu(const wxPoint& pos);
33 void OnMouseEvent(wxMouseEvent& event);
34 wxNotebookPage *homepage;
35 int contextTabID;
36 DECLARE_EVENT_TABLE()
39 class QemuUINotebookPage : public wxPanel
41 public:
42 QemuUINotebookPage(wxWindow *parent,QemuVM *vm = NULL,wxPanel *info = NULL, VNCPanel *vncpanel =NULL,ConsolePanel *console = NULL);
43 void SetVM(QemuVM *vm);
44 QemuVM* GetVM();
45 VNCPanel* GetScreen();
46 void SetVNCPanel(VNCPanel *vncpanel);
47 ConsolePanel* GetConsole();
48 void SetConsole(ConsolePanel *console);
49 void ShowInfo();
50 void ShowScreen();
51 void ShowConsole();
52 bool IsInfoPageActive();
53 bool IsScreenActive();
54 bool IsConsoleActive();
55 protected:
56 QemuVM *vm;
57 wxPanel *info;
58 VNCPanel *vncpanel;
59 ConsolePanel *console;
60 void *active;
61 wxBoxSizer *sizer;
64 enum {
65 QEMU_VM_NOTEBOOK = wxID_HIGHEST + 300,
66 QEMU_VM_NOTEBOOK_CONTEXT_CLOSE
69 #endif