-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDeskNoteWindow.cpp
More file actions
52 lines (38 loc) · 832 Bytes
/
DeskNoteWindow.cpp
File metadata and controls
52 lines (38 loc) · 832 Bytes
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
/*
* Original copyright 2000 by Colin Stewart (http://www.owlfish.com/).
* All rights reserved.
* Distributed under the terms of the BSD (3-clause) License.
*
* Authors:
* Janus2, 2015
*
*/
#include "DeskNoteWindow.h"
#include <Catalog.h>
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "Window"
DeskNoteWindow::DeskNoteWindow(BRect rect)
:
BWindow(rect, B_TRANSLATE_SYSTEM_NAME("DeskNotes"), B_FLOATING_WINDOW_LOOK,
B_NORMAL_WINDOW_FEEL, B_ASYNCHRONOUS_CONTROLS)
{
myView = new DeskNoteView(Bounds());
AddChild(myView);
}
void
DeskNoteWindow::SaveNote(BMessage* msg)
{
myView->SaveNote(msg);
}
void
DeskNoteWindow::RestoreNote(BMessage* msg)
{
myView->RestoreNote(msg);
}
bool
DeskNoteWindow::QuitRequested()
{
BMessage msg(B_QUIT_REQUESTED);
be_app->PostMessage(&msg);
return false;
}