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