My favorites
▼
|
Sign in
upp-mirror
U++ is the C++ development platform
Project Home
Downloads
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
reference
/
Framebuffer
/
Framebuffer.h
r5017
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#define GUI_FB
#include <Painter/Painter.h>
NAMESPACE_UPP
#define IMAGECLASS FBImg
#define IMAGEFILE <Framebuffer/FB.iml>
#include <Draw/iml_header.h>
class SystemDraw : public BufferPainter {
public:
virtual void BeginOp();
virtual void EndOp();
virtual void OffsetOp(Point p);
virtual bool ClipOp(const Rect& r);
virtual bool ClipoffOp(const Rect& r);
virtual bool IsPaintingOp(const Rect& r) const;
private:
Vector<Point> offset;
void Push();
void Pop();
public:
Point GetOffset() const;
bool CanSetSurface() { return false; }
bool Clip(const Rect& r) { return Draw::Clip(r); }
bool Clip(int x, int y, int cx, int cy) { return Draw::Clip(x, y, cx, cy); }
static void Flush() {}
SystemDraw();
~SystemDraw();
};
struct BackDraw__ : public SystemDraw {
BackDraw__() : SystemDraw() {}
};
class BackDraw : public BackDraw__ { // Dummy only, as we are running in GlobalBackBuffer mode
Size size;
Draw *painting;
Point painting_offset;
ImageBuffer ib;
public:
virtual bool IsPaintingOp(const Rect& r) const;
public:
void Put(SystemDraw& w, int x, int y) {}
void Put(SystemDraw& w, Point p) { Put(w, p.x, p.y); }
void Create(SystemDraw& w, int cx, int cy) {}
void Create(SystemDraw& w, Size sz) { Create(w, sz.cx, sz.cy); }
void Destroy() {}
void SetPaintingDraw(Draw& w, Point off) { painting = &w; painting_offset = off; }
BackDraw();
~BackDraw();
};
struct ImageDraw__ {
ImageBuffer image;
ImageBuffer alpha;
ImageDraw__(int cx, int cy) : image(cx, cy), alpha(cx, cy) {}
};
class ImageDraw : private ImageDraw__, public BufferPainter {
BufferPainter alpha_painter;
bool has_alpha;
Image Get(bool pm) const;
public:
Draw& Alpha();
operator Image() const { return Get(true); }
Image GetStraight() const { return Get(false); }
ImageDraw(Size sz);
ImageDraw(int cx, int cy);
};
void DrawDragRect(SystemDraw& w, const Rect& rect1, const Rect& rect2, const Rect& clip, int n,
Color color, uint64 pattern);
class TopWindowFrame;
#define GUIPLATFORM_CTRL_TOP_DECLS Ctrl *owner_window;
#define GUIPLATFORM_CTRL_DECLS_INCLUDE <Framebuffer/Ctrl.h>
#define GUIPLATFORM_PASTECLIP_DECLS \
bool dnd; \
friend struct DnDLoop; \
#define GUIPLATFORM_TOPWINDOW_DECLS_INCLUDE <Framebuffer/Top.h>
// to be implemented by final FB {
bool FBIsWaitingEvent();
bool FBProcessEvent(bool *quit);
void FBSleep(int ms);
void FBInitUpdate();
void FBUpdate(const Rect& area);
void FBFlush();
void FBQuitSession();
// }
class PrinterJob { // Dummy only...
NilDraw nil;
Vector<int> pages;
public:
Draw& GetDraw() { return nil; }
operator Draw&() { return GetDraw(); }
const Vector<int>& GetPages() const { return pages; }
int operator[](int i) const { return 0; }
int GetPageCount() const { return 0; }
bool Execute() { return false; }
PrinterJob& Landscape(bool b = true) { return *this; }
PrinterJob& MinMaxPage(int minpage, int maxpage) { return *this; }
PrinterJob& PageCount(int n) { return *this; }
PrinterJob& CurrentPage(int currentpage) { return *this; }
PrinterJob& Name(const char *_name) { return *this; }
PrinterJob(const char *name = NULL) {}
~PrinterJob() {}
};
END_UPP_NAMESPACE
#define GUIPLATFORM_INCLUDE_AFTER <Framebuffer/After.h>
Show details
Hide details
Change log
r4176
by cxl on Nov 16, 2011
Diff
.reference: Rainbow example (RM #158)
Go to:
/trunk/reference/Framebuffer
...nk/reference/Framebuffer/After.h
...erence/Framebuffer/ChSysInit.cpp
...k/reference/Framebuffer/Clip.cpp
...k/reference/Framebuffer/Ctrl.cpp
/trunk/reference/Framebuffer/Ctrl.h
...nk/reference/Framebuffer/DnD.cpp
...k/reference/Framebuffer/Draw.cpp
.../reference/Framebuffer/Event.cpp
/trunk/reference/Framebuffer/FB.iml
/trunk/reference/Framebuffer/Fb.h
...erence/Framebuffer/Framebuffer.h
...ence/Framebuffer/Framebuffer.upp
/trunk/reference/Framebuffer/Gui.h
.../reference/Framebuffer/Image.cpp
...nk/reference/Framebuffer/Top.cpp
/trunk/reference/Framebuffer/Top.h
...ference/Framebuffer/TopFrame.cpp
...k/reference/Framebuffer/Util.cpp
...nk/reference/Framebuffer/Wnd.cpp
/trunk/reference/Framebuffer/init
/trunk/reference/LinuxFb
/trunk/reference/LinuxFb/Keys.h
/trunk/reference/LinuxFb/LinuxFb.h
...nk/reference/LinuxFb/LinuxFb.upp
...reference/LinuxFb/LinuxFbLocal.h
/trunk/reference/LinuxFb/Local.h
/trunk/reference/LinuxFb/Proc.cpp
/trunk/reference/LinuxFb/Win.cpp
/trunk/reference/LinuxFb/init
/trunk/reference/LinuxFb/keymap.cpp
.../reference/LinuxFb/vgakeyboard.h
/trunk/reference/UWord_FB
/trunk/reference/UWord_FB/UWord.cpp
/trunk/reference/UWord_FB/UWord.iml
.../reference/UWord_FB/UWord_FB.upp
/trunk/reference/UWord_FB/icon.ico
/trunk/reference/UWord_FB/init
/trunk/reference/WinFb
/trunk/reference/WinFb/Keys.h
/trunk/reference/WinFb/Local.h
/trunk/reference/WinFb/Proc.cpp
/trunk/reference/WinFb/Win.cpp
/trunk/reference/WinFb/WinFb.h
/trunk/reference/WinFb/WinFb.upp
/trunk/reference/WinFb/init
/trunk/reference/guiplatform.h
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 3959 bytes, 141 lines
View raw file
Powered by
Google Project Hosting