1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _DIALOGCUSTOMCONTROLS_HXX_ 25 #define _DIALOGCUSTOMCONTROLS_HXX_ 26 27 #include "customcontrol.hxx" 28 29 #if defined _MSC_VER 30 #pragma warning(push, 1) 31 #endif 32 #include <windows.h> 33 #if defined _MSC_VER 34 #pragma warning(pop) 35 #endif 36 37 //----------------------------------- 38 // 39 //----------------------------------- 40 41 class CDummyCustomControl : public CCustomControl 42 { 43 public: 44 CDummyCustomControl(HWND aControlHandle, HWND aParentHandle); 45 46 virtual void SAL_CALL Align(); 47 virtual void SAL_CALL SetFont(HFONT hFont); 48 }; 49 50 //----------------------------------- 51 // 52 //----------------------------------- 53 54 class CDialogCustomControlBase : public CCustomControl 55 { 56 protected: 57 CDialogCustomControlBase(HWND aControlHandle, HWND aParentHandle); 58 59 virtual void SAL_CALL SetFont(HFONT hFont); 60 61 // aligns the specific control class to a reference 62 // buddy 63 // 64 void SAL_CALL AlignToBuddy(HWND aBuddyHandle); 65 66 protected: 67 HWND m_CustomControlHandle; 68 HWND m_ParentHandle; 69 }; 70 71 //----------------------------------- 72 // 73 //----------------------------------- 74 75 class CStaticCustomControl : public CDialogCustomControlBase 76 { 77 public: 78 CStaticCustomControl(HWND aControlHandle, HWND aParentHandle); 79 80 virtual void SAL_CALL Align(); 81 }; 82 83 //----------------------------------- 84 // 85 //----------------------------------- 86 87 class CPushButtonCustomControl : public CDialogCustomControlBase 88 { 89 public: 90 CPushButtonCustomControl(HWND aControlHandle, HWND aParentHandle); 91 92 virtual void SAL_CALL Align(); 93 }; 94 95 //----------------------------------- 96 // 97 //----------------------------------- 98 99 class CComboboxCustomControl : public CDialogCustomControlBase 100 { 101 public: 102 CComboboxCustomControl(HWND aControlHandle, HWND aParentHandle); 103 104 virtual void SAL_CALL Align(); 105 }; 106 107 //----------------------------------- 108 // 109 //----------------------------------- 110 111 class CCheckboxCustomControl : public CDialogCustomControlBase 112 { 113 public: 114 CCheckboxCustomControl(HWND aControlHandle, HWND aParentHandle); 115 116 virtual void SAL_CALL Align(); 117 }; 118 119 #endif 120