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
65
66
67
68
69
70
71
72
73
74
75
76
77
//$ class Ctrl {
static Ptr<Ctrl> desktop;
static Vector<Ctrl *> topctrl;
static InfoPanel infoPanel;

static float angle;
static float scale;
static float alpha;

static Point glCursorPos;
static Image glCursorImage;
static Rect glCaretRect;
static int glCaretTm;

static int64 glEventLoop;
static int64 glEndSessionLoop;

bool cliptobounds:1;

int FindTopCtrl() const;
static void SyncTopWindows();
void DestroyWnd();
void NewTop() { top = new Top; top->owner_window = NULL; }
void PutForeground();
static void MouseEventGl(Ptr<Ctrl> t, int event, Point p, int zdelta);

static void DrawLine(const Vector<Rect>& clip, int x, int y, int cx, int cy, bool horz,
const byte *pattern, int animation);
static void DragRectDraw0(const Vector<Rect>& clip, const Rect& rect, int n,
const byte *pattern, int animation);


friend class TopWindowFrame;
friend class SystemDraw;
friend struct DnDLoop;

void SetOpen(bool b) { isopen = b; }

protected:
static int PaintLock;

public:
static Console console;
static Rect screenRect;

static void InitGl();
static void ExitGl();
static void EndSession();
static bool DoMouseGl(Ctrl* q, int event, Point p, int zdelta);
static void DoMouseGl(int event, Point p, int zdelta = 0);
static bool DoKeyGl(dword key, int cnt);
static void CursorSync(Draw& w);
static void MouseSync(Draw& w);

static void SetDesktop(Ctrl& q);
static Ctrl *GetDesktop() { return desktop; }
static void SetWindowSize(Size sz);
static Size GetScreenSize() { return screenRect.GetSize(); }
static dword GetCaretTm() { return glCaretTm; }
static void ResetCaretTm() { glCaretTm = GetTickCount(); }

static void DrawScreen();

Ctrl& ClipToBounds(bool b = true) { cliptobounds = b; return *this; }
bool IsClipToBounds() const { return cliptobounds; }


virtual void ApplyTransform(TransformState state) {}
virtual void PostPaint(Draw& w) {}
void DragRectDraw(const Rect& rect1, const Rect& rect2, const Rect& clip, int n,
Color color, int type, int animation);

static Ctrl *FindMouseTopCtrl();

enum { DRAWDRAGRECT_SCREEN = 0x8000 };

//$ };

Change log

r4853 by unodgs on Apr 24, 2012   Diff
WinGL: Fixed timers, added support for
perspective view
Go to: 
Project members, sign in to write a code review

Older revisions

r4365 by unodgs on Jan 6, 2012   Diff
WinGL: Added painting through fbo,
added blur shader, fixed children
clipping, optimized painting a bit
r4188 by unodgs on Nov 22, 2011   Diff
WinGL: Added automatic atlas textures,
fixed some bugs
r3915 by unodgs on Sep 26, 2011   Diff
Rainbow: WinGL..
All revisions of this file

File info

Size: 2223 bytes, 77 lines

File properties

svn:eol-style
native
Powered by Google Project Hosting