]> git.saurik.com Git - wxWidgets.git/blob - src/common/bmpbtncmn.cpp
was missing in xti merge
[wxWidgets.git] / src / common / bmpbtncmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/bmpbtncmn.cpp
3 // Purpose: wxBitmapButton common code
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
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 #include "wx/bmpbuttn.h"
22
23 #ifndef WX_PRECOMP
24 #include "wx/log.h"
25 #include "wx/dcmemory.h"
26 #include "wx/image.h"
27 #endif
28
29 // ----------------------------------------------------------------------------
30 // XTI
31 // ----------------------------------------------------------------------------
32
33 wxDEFINE_FLAGS( wxBitmapButtonStyle )
34 wxBEGIN_FLAGS( wxBitmapButtonStyle )
35 // new style border flags, we put them first to
36 // use them for streaming out
37 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
38 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
39 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
40 wxFLAGS_MEMBER(wxBORDER_RAISED)
41 wxFLAGS_MEMBER(wxBORDER_STATIC)
42 wxFLAGS_MEMBER(wxBORDER_NONE)
43
44 // old style border flags
45 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
46 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
47 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
48 wxFLAGS_MEMBER(wxRAISED_BORDER)
49 wxFLAGS_MEMBER(wxSTATIC_BORDER)
50 wxFLAGS_MEMBER(wxBORDER)
51
52 // standard window styles
53 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
54 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
55 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
56 wxFLAGS_MEMBER(wxWANTS_CHARS)
57 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
58 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
59 wxFLAGS_MEMBER(wxVSCROLL)
60 wxFLAGS_MEMBER(wxHSCROLL)
61
62 wxFLAGS_MEMBER(wxBU_AUTODRAW)
63 wxFLAGS_MEMBER(wxBU_LEFT)
64 wxFLAGS_MEMBER(wxBU_RIGHT)
65 wxFLAGS_MEMBER(wxBU_TOP)
66 wxFLAGS_MEMBER(wxBU_BOTTOM)
67 wxEND_FLAGS( wxBitmapButtonStyle )
68
69 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxBitmapButton, wxButton, "wx/bmpbuttn.h")
70
71 wxBEGIN_PROPERTIES_TABLE(wxBitmapButton)
72 wxPROPERTY_FLAGS( WindowStyle, wxBitmapButtonStyle, long, \
73 SetWindowStyleFlag, GetWindowStyleFlag, \
74 wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), \
75 wxT("group")) // style
76 wxEND_PROPERTIES_TABLE()
77
78 wxEMPTY_HANDLERS_TABLE(wxBitmapButton)
79
80 wxCONSTRUCTOR_5( wxBitmapButton, wxWindow*, Parent, wxWindowID, Id, \
81 wxBitmap, Bitmap, wxPoint, Position, wxSize, Size )
82
83 /*
84 TODO PROPERTIES :
85
86 long "style" , wxBU_AUTODRAW
87 bool "default" , 0
88 bitmap "selected" ,
89 bitmap "focus" ,
90 bitmap "disabled" ,
91 */
92
93 #endif // wxUSE_BMPBUTTON