00001 #include <gui/MessageBox.h>
00002 #include <gui/MessageQueue.h>
00003 #include <gui/Button.h>
00004 #include <gui/InfoPanel.h>
00005 #include <gui/TopView.h>
00006 #include <gui/Exceptions.h>
00007 #include <gui/Window.h>
00008 #include <gui/StringView.h>
00009 #include <gui/ApplicationWindow.h>
00010 #include <gui/Application.h>
00011 #include <gui/Menu.h>
00012 #include <gui/TextView.h>
00013 #include <gui/StatusBar.h>
00014 #include <gui/CheckBox.h>
00015 #include <iostream>
00016
00017 using namespace SkyGI;
00018
00019 class MyInfoPanel : public View
00020 {
00021 public:
00022 MyInfoPanel(Window *pParent, const Rect &rFrame, unsigned int nWindowLayoutFlags);
00023 InfoPanel *pInfoPanel;
00024 };
00025
00026 MyInfoPanel::MyInfoPanel(Window *pParent, const Rect &rFrame, unsigned int nWindowLayoutFlags) : View(pParent, rFrame, nWindowLayoutFlags)
00027 {
00028 InfoPanelNode *pNode;
00029
00030 pInfoPanel = new InfoPanel(this, Rect(0,0,0,0), WINDOW_LAYOUT_SAME_SIZE);
00031
00032 pInfoPanel->AddSpace(15, 0);
00033 pNode = new InfoPanelNode(pInfoPanel, Rect(5,0,0,0), WINDOW_LAYOUT_SAME_WIDTH);
00034 pNode->SetTitle("Node 1");
00035 pInfoPanel->Add(pNode, 1, 0);
00036 pInfoPanel->AddSpace(15, 0);
00037
00038 pNode = new InfoPanelNode(pInfoPanel, Rect(5,0,0,0), WINDOW_LAYOUT_SAME_WIDTH);
00039 pNode->SetTitle("Node 2");
00040 pInfoPanel->Add(pNode, 1, 0);
00041 pInfoPanel->AddSpace(15, 0);
00042
00043 pInfoPanel->ReLayout();
00044 }
00045
00046 void InfoPanelTest()
00047 {
00048 Rect r(Point(100, 100), Point(400, 440));
00049
00050 ApplicationWindow* pApplicationWindow = new ApplicationWindow(r, "InfoPanel", WINDOW_LAYOUT_NOTHING, APPLICATION_WINDOW_NO_VIEW);
00051
00052 pApplicationWindow->GetTitleWindow()->SetFlags( (TitleWindowFlags)(pApplicationWindow->GetTitleWindow()->GetFlags() ));
00053 pApplicationWindow->AttachView(new MyInfoPanel(pApplicationWindow, pApplicationWindow->GetClientRect(), WINDOW_LAYOUT_NOTHING));
00054 pApplicationWindow->Show();
00055 }
00056