forked from HaikuArchives/DeskNotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeskNoteView.h
64 lines (48 loc) · 1.47 KB
/
DeskNoteView.h
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
60
61
62
63
// The DeskNoteView header file.
#ifndef _DESKNOTEVIEW_H
#define _DESKNOTEVIEW_H
#include <InterfaceKit.h>
#include <String.h>
#include <Application.h>
#include "DeskNoteApp.h"
#include "DeskNoteTextView.h"
#include "FontColourWindow.h"
// Launch DeskNotes.
#define DN_LAUNCH 'dnLN'
// Request to open the Font and Colour window.
#define DN_FNT_CLR 'dnFC'
// Request to change the current font and colour.
#define DN_CHG_FNT_CLR 'dnCF'
#define DN_NOTE_SAVE 'dnSV'
class DeskNoteTextView;
class DeskNoteView : public BView
{
public:
DeskNoteView (BRect rect);
DeskNoteView (BMessage *data);
~DeskNoteView ();
virtual void DetachedFromWindow ();
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void Draw (BRect rect);
virtual void MessageReceived (BMessage *msg);
virtual void FrameResized (float width, float height);
virtual void MouseDown(BPoint point);
virtual void CascadeFontAndColour (void);
virtual void SaveNote (BMessage *msg);
virtual void RestoreNote (BMessage *msg);
static BArchivable *Instantiate(BMessage *data);
static int32 ResizeViewMethod (void *data);
static const char defaultText[];
static const char aboutText[];
private:
void _ShowContextMenu(BPoint where);
bool WeAreAReplicant;
DeskNoteTextView *textView;
BRect ourSize;
FontColourWindow *propertiesWindow;
BMessage *orginalSettings;
BPopUpMenu *popupMenu;
rgb_color background, foreground, widgetcolour;
BDragger *dragger;
};
#endif