1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _DIALOGCUSTOMCONTROLS_HXX_
29 #define _DIALOGCUSTOMCONTROLS_HXX_
30 
31 #include "customcontrol.hxx"
32 
33 #if defined _MSC_VER
34 #pragma warning(push, 1)
35 #endif
36 #include <windows.h>
37 #if defined _MSC_VER
38 #pragma warning(pop)
39 #endif
40 
41 //-----------------------------------
42 //
43 //-----------------------------------
44 
45 class CDummyCustomControl : public CCustomControl
46 {
47 public:
48 	CDummyCustomControl(HWND aControlHandle, HWND aParentHandle);
49 
50 	virtual void SAL_CALL Align();
51 	virtual void SAL_CALL SetFont(HFONT hFont);
52 };
53 
54 //-----------------------------------
55 //
56 //-----------------------------------
57 
58 class CDialogCustomControlBase : public CCustomControl
59 {
60 protected:
61 	CDialogCustomControlBase(HWND aControlHandle, HWND aParentHandle);
62 
63 	virtual void SAL_CALL SetFont(HFONT hFont);
64 
65 	// aligns the specific control class to a reference
66 	// buddy
67 	//
68 	void SAL_CALL AlignToBuddy(HWND aBuddyHandle);
69 
70 protected:
71 	HWND m_CustomControlHandle;
72 	HWND m_ParentHandle;
73 };
74 
75 //-----------------------------------
76 //
77 //-----------------------------------
78 
79 class CStaticCustomControl : public CDialogCustomControlBase
80 {
81 public:
82 	CStaticCustomControl(HWND aControlHandle, HWND aParentHandle);
83 
84 	virtual void SAL_CALL Align();
85 };
86 
87 //-----------------------------------
88 //
89 //-----------------------------------
90 
91 class CPushButtonCustomControl : public CDialogCustomControlBase
92 {
93 public:
94 	CPushButtonCustomControl(HWND aControlHandle, HWND aParentHandle);
95 
96 	virtual void SAL_CALL Align();
97 };
98 
99 //-----------------------------------
100 //
101 //-----------------------------------
102 
103 class CComboboxCustomControl : public CDialogCustomControlBase
104 {
105 public:
106 	CComboboxCustomControl(HWND aControlHandle, HWND aParentHandle);
107 
108 	virtual void SAL_CALL Align();
109 };
110 
111 //-----------------------------------
112 //
113 //-----------------------------------
114 
115 class CCheckboxCustomControl : public CDialogCustomControlBase
116 {
117 public:
118 	CCheckboxCustomControl(HWND aControlHandle, HWND aParentHandle);
119 
120 	virtual void SAL_CALL Align();
121 };
122 
123 #endif
124