mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
.developing rainbow
git-svn-id: svn://ultimatepp.org/upp/trunk@3611 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4f567f6103
commit
d3f63146be
2 changed files with 255 additions and 0 deletions
55
rainbow/Framebuffer/Fb.h
Normal file
55
rainbow/Framebuffer/Fb.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#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 LeftDouble(Point p, dword keyflags);
|
||||
virtual void MouseMove(Point p, dword keyflags);
|
||||
|
||||
private:
|
||||
Point dir;
|
||||
Point startpos;
|
||||
Rect startrect;
|
||||
|
||||
bool maximized;
|
||||
Rect overlapped;
|
||||
|
||||
Point GetDragMode(Point p);
|
||||
void StartDrag();
|
||||
Rect Margins() const;
|
||||
Rect ComputeClient(Rect r);
|
||||
|
||||
typedef TopWindowFrame CLASSNAME;
|
||||
|
||||
public:
|
||||
String title;
|
||||
Button close, maximize;
|
||||
Image icon;
|
||||
Size minsize;
|
||||
bool sizeable;
|
||||
|
||||
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
|
||||
Loading…
Reference in a new issue