]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: statbmp.cpp | |
3 | // Purpose: wxStaticBitmap | |
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 "statbmp.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 | #if wxUSE_STATBMP | |
32 | ||
33 | #include "wx/window.h" | |
34 | #include "wx/palmos/private.h" | |
35 | ||
36 | #ifndef WX_PRECOMP | |
37 | #include "wx/icon.h" | |
38 | #include "wx/statbmp.h" | |
39 | #endif | |
40 | ||
41 | // --------------------------------------------------------------------------- | |
42 | // macors | |
43 | // --------------------------------------------------------------------------- | |
44 | ||
45 | #if wxUSE_EXTENDED_RTTI | |
46 | WX_DEFINE_FLAGS( wxStaticBitmapStyle ) | |
47 | ||
48 | wxBEGIN_FLAGS( wxStaticBitmapStyle ) | |
49 | // new style border flags, we put them first to | |
50 | // use them for streaming out | |
51 | wxFLAGS_MEMBER(wxBORDER_SIMPLE) | |
52 | wxFLAGS_MEMBER(wxBORDER_SUNKEN) | |
53 | wxFLAGS_MEMBER(wxBORDER_DOUBLE) | |
54 | wxFLAGS_MEMBER(wxBORDER_RAISED) | |
55 | wxFLAGS_MEMBER(wxBORDER_STATIC) | |
56 | wxFLAGS_MEMBER(wxBORDER_NONE) | |
57 | ||
58 | // old style border flags | |
59 | wxFLAGS_MEMBER(wxSIMPLE_BORDER) | |
60 | wxFLAGS_MEMBER(wxSUNKEN_BORDER) | |
61 | wxFLAGS_MEMBER(wxDOUBLE_BORDER) | |
62 | wxFLAGS_MEMBER(wxRAISED_BORDER) | |
63 | wxFLAGS_MEMBER(wxSTATIC_BORDER) | |
64 | wxFLAGS_MEMBER(wxBORDER) | |
65 | ||
66 | // standard window styles | |
67 | wxFLAGS_MEMBER(wxTAB_TRAVERSAL) | |
68 | wxFLAGS_MEMBER(wxCLIP_CHILDREN) | |
69 | wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) | |
70 | wxFLAGS_MEMBER(wxWANTS_CHARS) | |
71 | wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) | |
72 | wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) | |
73 | wxFLAGS_MEMBER(wxVSCROLL) | |
74 | wxFLAGS_MEMBER(wxHSCROLL) | |
75 | ||
76 | wxEND_FLAGS( wxStaticBitmapStyle ) | |
77 | ||
78 | IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBitmap, wxControl,"wx/statbmp.h") | |
79 | ||
80 | wxBEGIN_PROPERTIES_TABLE(wxStaticBitmap) | |
81 | wxPROPERTY_FLAGS( WindowStyle , wxStaticBitmapStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style | |
82 | wxEND_PROPERTIES_TABLE() | |
83 | ||
84 | wxBEGIN_HANDLERS_TABLE(wxStaticBitmap) | |
85 | wxEND_HANDLERS_TABLE() | |
86 | ||
87 | wxCONSTRUCTOR_5( wxStaticBitmap, wxWindow* , Parent , wxWindowID , Id , wxBitmap, Bitmap, wxPoint , Position , wxSize , Size ) | |
88 | ||
89 | #else | |
90 | IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) | |
91 | #endif | |
92 | ||
93 | /* | |
94 | TODO PROPERTIES : | |
95 | bitmap | |
96 | */ | |
97 | ||
98 | // =========================================================================== | |
99 | // implementation | |
100 | // =========================================================================== | |
101 | ||
102 | // --------------------------------------------------------------------------- | |
103 | // wxStaticBitmap | |
104 | // --------------------------------------------------------------------------- | |
105 | ||
106 | static wxGDIImage* ConvertImage( const wxGDIImage& bitmap ) | |
107 | { | |
108 | return NULL; | |
109 | } | |
110 | ||
111 | bool wxStaticBitmap::Create(wxWindow *parent, | |
112 | wxWindowID id, | |
113 | const wxGDIImage& bitmap, | |
114 | const wxPoint& pos, | |
115 | const wxSize& size, | |
116 | long style, | |
117 | const wxString& name) | |
118 | { | |
119 | return false; | |
120 | } | |
121 | ||
122 | wxBorder wxStaticBitmap::GetDefaultBorder() const | |
123 | { | |
124 | return wxBORDER_NONE; | |
125 | } | |
126 | ||
127 | WXDWORD wxStaticBitmap::MSWGetStyle(long style, WXDWORD *exstyle) const | |
128 | { | |
129 | return 0; | |
130 | } | |
131 | ||
132 | bool wxStaticBitmap::ImageIsOk() const | |
133 | { | |
134 | return false; | |
135 | } | |
136 | ||
137 | void wxStaticBitmap::Free() | |
138 | { | |
139 | } | |
140 | ||
141 | wxSize wxStaticBitmap::DoGetBestSize() const | |
142 | { | |
143 | return wxSize(0,0); | |
144 | } | |
145 | ||
146 | void wxStaticBitmap::SetImage( const wxGDIImage* image ) | |
147 | { | |
148 | } | |
149 | ||
150 | void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image) | |
151 | { | |
152 | } | |
153 | ||
154 | // We need this or the control can never be moved e.g. in Dialog Editor. | |
155 | WXLRESULT wxStaticBitmap::MSWWindowProc(WXUINT nMsg, | |
156 | WXWPARAM wParam, | |
157 | WXLPARAM lParam) | |
158 | { | |
159 | return false; | |
160 | } | |
161 | ||
162 | #endif // wxUSE_STATBMP |