56 if (size ==
wxSize(bw, bh))
68 const unsigned char *data = image.
GetData();
69 const unsigned char *alpha = image.
GetAlpha();
70 unsigned char *rgb = (
unsigned char *) calloc(w * h, 3);
71 unsigned char *a = (
unsigned char *) calloc(w * h, 1);
74 for (
int row = 0; row < bh; row++)
76 memcpy(rgb + ((row + y) * w + x) * 3, data + (row * bw) * 3, bw * 3);
77 memcpy(a + ((row + y) * w + x), alpha + (row * bw), bw);
91 if (m_class ==
_T(
"tool"))
106 GetBool(
_T(
"toggle")),
113 GetText(
_T(
"tooltip")),
114 GetText(
_T(
"longhelp")));
115 if (GetBool(
_T(
"disabled")))
124 if (GetBool(
_T(
"radio")))
126 if (GetBool(
_T(
"toggle")))
129 _(
"can't have both toggleable and radion button at once") );
133 GetText(
_T(
"label")),
137 GetText(
_T(
"tooltip")),
138 GetText(
_T(
"longhelp")));
139 if (GetBool(
_T(
"disabled")))
148 else if (m_class ==
_T(
"separator"))
176 toolbar->Create(m_parentAsWindow,
182 wxSize bmpsize = GetSize(
_T(
"bitmapsize"));
185 wxSize margins = GetSize(
_T(
"margins"));
188 long packing = GetLong(
_T(
"packing"), -1);
191 long separation = GetLong(
_T(
"separation"), -1);
192 if (separation != -1)
196 wxXmlNode *children_node = GetParamNode(
_T(
"object"));
198 children_node = GetParamNode(
_T(
"object_ref"));
200 if (children_node ==
NULL)
return toolbar;
212 wxObject *created = CreateResFromNode(n, toolbar,
NULL);
214 if (!IsOfClass(n,
_T(
"tool")) &&
215 !IsOfClass(n,
_T(
"separator")) &&
233 if (m_parentAsWindow && !GetBool(
_T(
"dontattachtoframe")))
237 parentFrame->SetToolBar(toolbar);
256 #if wxCHECK_VERSION(3, 0, 0) 261 bool istbar = node->GetPropVal(
wxT(
"class"),
wxEmptyString).Matches(
_T(
"wxToolBarAddOn"));
283 dlg->Create(m_parentAsWindow,
285 GetText(
wxT(
"title")),
290 if (HasParam(
wxT(
"size")))
291 dlg->SetClientSize(GetSize(
wxT(
"size"), dlg));
292 if (HasParam(
wxT(
"pos")))
293 dlg->Move(GetPosition());
294 if (HasParam(
wxT(
"icon")))
301 if (GetBool(
wxT(
"centered"),
false))
309 return IsOfClass(node,
wxT(
"wxScrollingDialog"));
#define wxASSERT_MSG(condition, message)
#define wxDynamicCast(ptr, classname)
wxArtClient wxART_TOOLBAR
bool GetAttribute(const wxString &attrName, wxString *value) const
virtual wxImage ConvertToImage() const
unsigned char * GetAlpha() const
const wxString & GetName() const
unsigned char * GetData() const
wxXmlNode * GetNext() const
wxXmlNodeType GetType() const
virtual int GetWidth() const
const wxSize wxDefaultSize
const wxPoint wxDefaultPosition
#define wxCHECK_VERSION(major, minor, release)
IMPLEMENT_DYNAMIC_CLASS(cbDummyEditor, wxPGEditor)
#define wxDEFAULT_DIALOG_STYLE
const wxString & _(const wxString &string)
#define wxCHECK_MSG(condition, retValue, message)
#define wxStaticCast(ptr, classname)
wxArtClient wxART_FRAME_ICON
virtual int GetHeight() const
wxImage & Resize(const wxSize &size, const wxPoint &pos, int red=-1, int green=-1, int blue=-1)