]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: private.h | |
3 | // Purpose: Private declarations | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart and Markus Holzem | |
9 | // Licence: wxWindows license | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef __PRIVATEH__ | |
13 | #define __PRIVATEH__ | |
14 | ||
15 | #include "wx/defs.h" | |
16 | ||
17 | #include <windows.h> | |
18 | ||
19 | #define VIEWPORT_EXTENT 1000 | |
20 | ||
21 | class WXDLLEXPORT wxFont ; | |
22 | ||
23 | void WXDLLEXPORT wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font); | |
24 | void WXDLLEXPORT wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos); | |
25 | wxWindow* WXDLLEXPORT wxFindWinFromHandle(WXHWND hWnd); | |
26 | void WXDLLEXPORT wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos); | |
27 | ||
28 | WXDLLEXPORT_DATA(extern HICON) wxSTD_FRAME_ICON; | |
29 | WXDLLEXPORT_DATA(extern HICON) wxSTD_MDIPARENTFRAME_ICON; | |
30 | WXDLLEXPORT_DATA(extern HICON) wxSTD_MDICHILDFRAME_ICON; | |
31 | WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_FRAME_ICON; | |
32 | WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON; | |
33 | WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON; | |
34 | WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; | |
35 | ||
36 | extern HINSTANCE WXDLLEXPORT wxGetInstance(); | |
37 | void WXDLLEXPORT wxFillLogFont(LOGFONT *logFont, wxFont *font); | |
38 | wxFont WXDLLEXPORT wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNew = TRUE); | |
39 | ||
40 | #ifdef __GNUWIN32__ | |
41 | #define CASTWNDPROC (long unsigned) | |
42 | #else | |
43 | #define CASTWNDPROC | |
44 | #endif | |
45 | ||
46 | #if !defined(APIENTRY) // NT defines APIENTRY, 3.x not | |
47 | #define APIENTRY FAR PASCAL | |
48 | #endif | |
49 | ||
50 | #ifdef __WIN32__ | |
51 | #define _EXPORT /**/ | |
52 | #else | |
53 | #define _EXPORT _export | |
54 | typedef signed short int SHORT ; | |
55 | #endif | |
56 | ||
57 | #if !defined(__WIN32__) // 3.x uses FARPROC for dialogs | |
58 | #define DLGPROC FARPROC | |
59 | #endif | |
60 | ||
61 | #if USE_PENWIN | |
62 | void WXDLLEXPORT wxRegisterPenWin(void); | |
63 | void WXDLLEXPORT wxCleanUpPenWin(void); | |
64 | void WXDLLEXPORT wxEnablePenAppHooks (bool hook); | |
65 | #endif | |
66 | ||
67 | #if USE_ITSY_BITSY | |
68 | #define IBS_HORZCAPTION 0x4000L | |
69 | #define IBS_VERTCAPTION 0x8000L | |
70 | ||
71 | UINT WINAPI ibGetCaptionSize( HWND hWnd ) ; | |
72 | UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) ; | |
73 | LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ; | |
74 | VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ; | |
75 | #endif | |
76 | ||
77 | /* When implementing a new item, be sure to: | |
78 | * | |
79 | * - add the item to the parent panel | |
80 | * - set window_parent to the parent | |
81 | * - NULL any extra child window pointers not created for this item | |
82 | * (e.g. label control that wasn't needed) | |
83 | * - delete any extra child windows in the destructor (e.g. label control) | |
84 | * - implement GetSize and SetSize | |
85 | * - to find panel position if coordinates are (-1, -1), use GetPosition | |
86 | * - call AdvanceCursor after creation, for panel layout mechanism. | |
87 | * | |
88 | */ | |
89 | ||
90 | #if CTL3D | |
91 | #include <wx/msw/ctl3d/ctl3d.h> | |
92 | #endif | |
93 | ||
94 | /* | |
95 | * Decide what window classes we're going to use | |
96 | * for this combination of CTl3D/FAFA settings | |
97 | */ | |
98 | ||
99 | #define STATIC_CLASS "STATIC" | |
100 | #define STATIC_FLAGS (SS_LEFT|WS_CHILD|WS_VISIBLE) | |
101 | #define CHECK_CLASS "BUTTON" | |
102 | #define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP|WS_CHILD) | |
103 | #define CHECK_IS_FAFA FALSE | |
104 | #define RADIO_CLASS "BUTTON" | |
105 | #define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_CHILD|WS_VISIBLE) | |
106 | #define RADIO_SIZE 20 | |
107 | #define RADIO_IS_FAFA FALSE | |
108 | #define PURE_WINDOWS | |
109 | #define GROUP_CLASS "BUTTON" | |
110 | #define GROUP_FLAGS (BS_GROUPBOX|WS_CHILD|WS_VISIBLE) | |
111 | ||
112 | /* | |
113 | #define BITCHECK_FLAGS (FB_BITMAP|FC_BUTTONDRAW|FC_DEFAULT|WS_VISIBLE) | |
114 | #define BITRADIO_FLAGS (FC_BUTTONDRAW|FB_BITMAP|FC_RADIO|WS_CHILD|WS_VISIBLE) | |
115 | */ | |
116 | ||
117 | #define MEANING_CHARACTER '0' | |
118 | #define DEFAULT_ITEM_WIDTH 200 | |
119 | #define DEFAULT_ITEM_HEIGHT 80 | |
120 | #define EDIT_CONTROL_FACTOR (15.0/10.0) | |
121 | // Scale font to get edit control height | |
122 | ||
123 | // Generic subclass proc, for panel item moving/sizing and intercept | |
124 | // EDIT control VK_RETURN messages | |
125 | extern LONG APIENTRY _EXPORT | |
126 | wxSubclassedGenericControlProc(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); | |
127 | ||
128 | // Find maximum size of window/rectangle | |
129 | extern void WXDLLEXPORT wxFindMaxSize(WXHWND hwnd, RECT *rect); | |
130 | ||
131 | // List of scrollbar controls | |
132 | WXDLLEXPORT_DATA(extern wxList) wxScrollBarList; | |
133 | // The MakeProcInstance version of the function wxSubclassedGenericControlProc | |
134 | WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc; | |
135 | WXDLLEXPORT_DATA(extern char*) wxBuffer; | |
136 | WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; | |
137 | ||
138 | wxWindow* WXDLLEXPORT wxFindControlFromHandle(WXHWND hWnd); | |
139 | void WXDLLEXPORT wxAddControlHandle(WXHWND hWnd, wxWindow *item); | |
140 | ||
141 | #if !defined(__WIN32__) && !defined(WS_EX_CLIENTEDGE) | |
142 | #define WS_EX_CLIENTEDGE 0 | |
143 | #endif | |
144 | ||
145 | #endif | |
146 | // __PRIVATEH__ |