]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/colordlg.h
honour user scale and source offset in wxDC::Blit() (#2605)
[wxWidgets.git] / include / wx / msw / colordlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/colordlg.h
3 // Purpose: wxColourDialog class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_COLORDLG_H_
13 #define _WX_COLORDLG_H_
14
15 #include "wx/defs.h"
16 #include "wx/dialog.h"
17 #include "wx/cmndata.h"
18
19 // ----------------------------------------------------------------------------
20 // wxColourDialog: dialog for choosing a colours
21 // ----------------------------------------------------------------------------
22
23 class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog
24 {
25 public:
26 wxColourDialog() { Init(); }
27 wxColourDialog(wxWindow *parent, wxColourData *data = NULL)
28 {
29 Init();
30
31 Create(parent, data);
32 }
33
34 bool Create(wxWindow *parent, wxColourData *data = NULL);
35
36 wxColourData& GetColourData() { return m_colourData; }
37
38 // override some base class virtuals
39 virtual void SetTitle(const wxString& title);
40 virtual wxString GetTitle() const;
41
42 virtual int ShowModal();
43
44 // wxMSW-specific implementation from now on
45 // -----------------------------------------
46
47 // called from the hook procedure on WM_INITDIALOG reception
48 virtual void MSWOnInitDone(WXHWND hDlg);
49
50 protected:
51 // common part of all ctors
52 void Init();
53
54 #if !(defined(__SMARTPHONE__) && defined(__WXWINCE__))
55 virtual void DoGetPosition( int *x, int *y ) const;
56 virtual void DoGetSize(int *width, int *height) const;
57 virtual void DoGetClientSize(int *width, int *height) const;
58 virtual void DoMoveWindow(int x, int y, int width, int height);
59 virtual void DoCentre(int dir);
60 #endif // !(__SMARTPHONE__ && __WXWINCE__)
61
62 wxColourData m_colourData;
63 wxString m_title;
64
65 // indicates that the dialog should be centered in this direction if non 0
66 // (set by DoCentre(), used by MSWOnInitDone())
67 int m_centreDir;
68
69 // true if DoMoveWindow() had been called
70 bool m_movedWindow;
71
72
73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxColourDialog)
74 };
75
76 #endif // _WX_COLORDLG_H_