1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#include <gui/ApplicationWindow.h>
#include <gui/Application.h>
using namespace SkyGI;
class MyApp : public Application {
public:
MyApp(int argc, char *argv[]);
};
class MyApplicationWindow : public ApplicationWindow {
public:
MyApplicationWindow( const Rect &rFrame,
const String& szTitle,
unsigned int nWindowLayoutFlags,
unsigned int uiFlags = 0);
void OnCommand( const MessageCommand *pMessage);
};
MyApplicationWindow::MyApplicationWindow( const Rect &rFrame,
const String& szTitle,
unsigned int nWindowLayoutFlags,
unsigned int uiFlags
): ApplicationWindow(rFrame, szTitle, nWindowLayoutFlags)
{
}
void MyApplicationWindow::OnCommand(const MessageCommand *pMessage) {
switch (pMessage->GetID()) {
default:
break;
}
}
MyApp::MyApp(int argc, char* argv[]):
Application("application/x-vnd.Calculator", argc, argv) {
Rect r(Point(100, 100), Point(400, 300));
MyApplicationWindow* pApplicationWindow =
new MyApplicationWindow(r, "Calculator", WINDOW_LAYOUT_NOTHING,
APPLICATION_WINDOW_NO_VIEW);
pApplicationWindow->GetTitleWindow()->SetFlags(
(TitleWindowFlags)(pApplicationWindow->GetTitleWindow()->GetFlags()
));
pApplicationWindow->Show();
}
int main(int argc, char *argv[]) {
MyApp pApp(argc, argv);
return pApp.Run();
}
|