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