Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CWindowCtrl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Sun Aug 15 01:53:13 2010 UTC (13 years, 9 months ago) by okadu
File MIME type: text/x-chdr
File size: 1488 byte(s)


1 #ifndef CWINDOWCTRL_H_INCLUDED
2 #define CWINDOWCTRL_H_INCLUDED
3
4 #include "CInterface.h"
5 #include "CMiniButton.h"
6
7 class CWindowCtrl;
8
9 /*
10 * ウィンドウリサイザ
11 */
12 class CWindowResizer{
13 public:
14 virtual void WindowResized(int, int, CWindowCtrl *) = 0;
15 };
16
17 /*
18 * ウィンドウコントロール
19 */
20 class CWindowCtrl: public CInterface{
21 protected:
22 int m_State; // 状態
23 int m_OldX, m_OldY; // 移動前座標
24 int m_DragX, m_DragY; // タイトルバードラッグ座標
25 int m_MinWidth, m_MinHeight; // 最小サイズ
26 int m_MaxWidth, m_MaxHeight; // 最大サイズ
27 D3DCOLOR m_Color; // ウィンドウ色
28 CMiniButton *m_CloseButton; // クローズボタン
29 CWindowResizer *m_Resizer; // リサイザ
30 public:
31 CWindowCtrl();
32 virtual ~CWindowCtrl();
33 void Init(int, int, int, int, char *, CInterface *p, bool);
34 virtual void SetSize(int, int);
35 void SetResize(int, int, int, int, CWindowResizer *);
36 bool CheckClose(){ return m_Visible && m_CloseButton->IsPushed(); }
37 void SetColor(D3DCOLOR c){ m_Color = c; }
38 void SetAutoTransparent();
39 bool IsInsideTitleBar(int, int);
40 bool IsInsideLeftGrab(int, int);
41 bool IsInsideTopGrab(int, int);
42 bool IsInsideRightGrab(int, int);
43 bool IsInsideBottomGrab(int, int);
44 void BeginDrag(int, int, int);
45 virtual int GetWindowState(){ return 0; }
46 bool ScanInput();
47 virtual bool ScanInputWindow(){ return false; }
48 void Render();
49 virtual void RenderWindow(){}
50 };
51
52 // 外部グローバル
53 extern CWindowCtrl *g_ModalDialog;
54
55 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26