]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/bmpbuttn.cpp
added wxIsSameDouble() which wraps double comparison in a pragmas disabling icc warni...
[wxWidgets.git] / src / palmos / bmpbuttn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/bmpbuttn.cpp
3 // Purpose: wxBitmapButton
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #ifdef __BORLANDC__
16 #pragma hdrstop
17 #endif
18
19 #if wxUSE_BMPBUTTON
20
21 #ifndef WX_PRECOMP
22 #include "wx/bmpbuttn.h"
23 #include "wx/log.h"
24 #include "wx/dcmemory.h"
25 #endif
26
27 #include "wx/palmos/private.h"
28
29 // ----------------------------------------------------------------------------
30 // macros
31 // ----------------------------------------------------------------------------
32
33 #if wxUSE_EXTENDED_RTTI
34
35 WX_DEFINE_FLAGS( wxBitmapButtonStyle )
36
37 wxBEGIN_FLAGS( wxBitmapButtonStyle )
38 // new style border flags, we put them first to
39 // use them for streaming out
40 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
41 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
42 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
43 wxFLAGS_MEMBER(wxBORDER_RAISED)
44 wxFLAGS_MEMBER(wxBORDER_STATIC)
45 wxFLAGS_MEMBER(wxBORDER_NONE)
46
47 // old style border flags
48 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
49 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
50 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
51 wxFLAGS_MEMBER(wxRAISED_BORDER)
52 wxFLAGS_MEMBER(wxSTATIC_BORDER)
53 wxFLAGS_MEMBER(wxBORDER)
54
55 // standard window styles
56 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
57 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
58 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
59 wxFLAGS_MEMBER(wxWANTS_CHARS)
60 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
61 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
62 wxFLAGS_MEMBER(wxVSCROLL)
63 wxFLAGS_MEMBER(wxHSCROLL)
64
65 wxFLAGS_MEMBER(wxBU_AUTODRAW)
66 wxFLAGS_MEMBER(wxBU_LEFT)
67 wxFLAGS_MEMBER(wxBU_RIGHT)
68 wxFLAGS_MEMBER(wxBU_TOP)
69 wxFLAGS_MEMBER(wxBU_BOTTOM)
70 wxEND_FLAGS( wxBitmapButtonStyle )
71
72 IMPLEMENT_DYNAMIC_CLASS_XTI(wxBitmapButton, wxButton,"wx/bmpbuttn.h")
73
74 wxBEGIN_PROPERTIES_TABLE(wxBitmapButton)
75 wxPROPERTY_FLAGS( WindowStyle , wxBitmapButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
76 wxEND_PROPERTIES_TABLE()
77
78 wxBEGIN_HANDLERS_TABLE(wxBitmapButton)
79 wxEND_HANDLERS_TABLE()
80
81 wxCONSTRUCTOR_5( wxBitmapButton , wxWindow* , Parent , wxWindowID , Id , wxBitmap , Bitmap , wxPoint , Position , wxSize , Size )
82
83 #else
84 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
85 #endif
86
87 #define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1)
88
89 bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
90 const wxBitmap& bitmap,
91 const wxPoint& pos,
92 const wxSize& size, long style,
93 const wxValidator& wxVALIDATOR_PARAM(validator),
94 const wxString& name)
95 {
96 return false;
97 }
98
99 #define FOCUS_MARGIN 3
100
101 void wxBitmapButton::DrawFace( WXHDC dc, int left, int top,
102 int right, int bottom, bool sel )
103 {
104 }
105
106 void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right,
107 int bottom, bool WXUNUSED(sel) )
108 {
109 }
110
111 void wxBitmapButton::DrawButtonDisable( WXHDC dc, int left, int top, int right,
112 int bottom, bool with_marg )
113 {
114 }
115
116 void wxBitmapButton::SetDefault()
117 {
118 }
119
120 wxSize wxBitmapButton::DoGetBestSize() const
121 {
122 wxSize best;
123 best.x = 0;
124 best.y = 0;
125
126 return best;
127 }
128
129 #endif // wxUSE_BMPBUTTON
130