My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
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
64
#ifndef _Framebuffer_Fb_h_
#define _Framebuffer_Fb_h_

#include <CtrlLib/CtrlLib.h>

NAMESPACE_UPP

class TopWindowFrame : public Ctrl {
public:
virtual void Layout();
virtual void Paint(Draw& w);
virtual Image CursorImage(Point p, dword keyflags);
virtual void LeftDown(Point p, dword keyflags);
virtual void LeftHold(Point p, dword keyflags);
virtual void LeftDouble(Point p, dword keyflags);
virtual void MouseMove(Point p, dword keyflags);
virtual void CancelMode();
virtual void LeftUp(Point p, dword keyflags);

private:
Point dir;
Point startpos;
Rect startrect;

bool maximized;
Rect overlapped;

bool holding;
TimeCallback hold;

Point GetDragMode(Point p);
Image GetDragImage(Point dragmode);
void StartDrag();
Rect Margins() const;
Rect ComputeClient(Rect r);
void Hold();

typedef TopWindowFrame CLASSNAME;

public:
String title;
Button close, maximize;
Image icon;
Size minsize;
bool sizeable;
TopWindow *window;

void SetTitle(const String& s) { title = s; Refresh(); }
Rect GetClient() const;
void SetClient(Rect r);
void GripResize();

void Maximize();
void Overlap();
void ToggleMaximize();
bool IsMaximized() const { return maximized; }
void SyncRect();

TopWindowFrame();
};

END_UPP_NAMESPACE

#endif

Change log

r4176 by cxl on Nov 16, 2011   Diff
.reference: Rainbow example (RM #158)
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1385 bytes, 64 lines
Powered by Google Project Hosting