]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/colordlg.cpp
added {debughlp|stackwalk}.{h|cpp}
[wxWidgets.git] / src / palmos / colordlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/colordlg.cpp
3 // Purpose: wxColourDialog class
4 // Author: William Osborne
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id:
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "colordlg.h"
22 #endif
23
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
26
27 #ifdef __BORLANDC__
28 #pragma hdrstop
29 #endif
30
31 #ifndef WX_PRECOMP
32 #include <stdio.h>
33 #include "wx/defs.h"
34 #include "wx/bitmap.h"
35 #include "wx/pen.h"
36 #include "wx/brush.h"
37 #include "wx/colour.h"
38 #include "wx/gdicmn.h"
39 #include "wx/utils.h"
40 #include "wx/frame.h"
41 #include "wx/dialog.h"
42 #include "wx/msgdlg.h"
43 #include "wx/math.h"
44 #endif
45
46 #if wxUSE_COLOURDLG && !defined(__SMARTPHONE__)
47
48 #include "wx/palmos/private.h"
49 #include "wx/colordlg.h"
50 #include "wx/cmndata.h"
51
52 #include <stdlib.h>
53 #include <string.h>
54
55 // ----------------------------------------------------------------------------
56 // wxWin macros
57 // ----------------------------------------------------------------------------
58
59 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)
60
61 // ============================================================================
62 // implementation
63 // ============================================================================
64
65 // ----------------------------------------------------------------------------
66 // wxColourDialog
67 // ----------------------------------------------------------------------------
68
69 wxColourDialog::wxColourDialog()
70 {
71 }
72
73 wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data)
74 {
75 }
76
77 bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
78 {
79 return false;
80 }
81
82 int wxColourDialog::ShowModal()
83 {
84 return wxID_CANCEL;
85 }
86
87 // ----------------------------------------------------------------------------
88 // title
89 // ----------------------------------------------------------------------------
90
91 void wxColourDialog::SetTitle(const wxString& title)
92 {
93 m_title = title;
94 }
95
96 wxString wxColourDialog::GetTitle() const
97 {
98 return m_title;
99 }
100
101 // ----------------------------------------------------------------------------
102 // position/size
103 // ----------------------------------------------------------------------------
104
105 void wxColourDialog::DoGetPosition(int *x, int *y) const
106 {
107 if ( x )
108 *x = m_pos.x;
109 if ( y )
110 *y = m_pos.y;
111 }
112
113 void wxColourDialog::DoSetSize(int x, int y,
114 int WXUNUSED(width), int WXUNUSED(height),
115 int WXUNUSED(sizeFlags))
116 {
117 if ( x != -1 )
118 m_pos.x = x;
119
120 if ( y != -1 )
121 m_pos.y = y;
122
123 // ignore the size params - we can't change the size of a standard dialog
124 return;
125 }
126
127 // NB: of course, both of these functions are completely bogus, but it's better
128 // than nothing
129 void wxColourDialog::DoGetSize(int *width, int *height) const
130 {
131 // the standard dialog size
132 if ( width )
133 *width = 225;
134 if ( height )
135 *height = 324;
136 }
137
138 void wxColourDialog::DoGetClientSize(int *width, int *height) const
139 {
140 // the standard dialog size
141 if ( width )
142 *width = 219;
143 if ( height )
144 *height = 299;
145 }
146
147 #endif