added 'icon' property to wxFrame and wxDialog in XRC

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-10-31 11:42:27 +00:00
parent db6b57fff5
commit 8b34993daa
4 changed files with 37 additions and 0 deletions

View File

@@ -301,12 +301,40 @@ Example:
</object> </object>
wxDialog
--------
position Position -1,-1
size Size -1,-1
style Style[wxDialog] wxDEFAULT_DIALOG_STYLE
title I18nString ""
icon Bitmap (empty)
centered Boolean false
wxDialog may have children objects.
wxFrame
--------
position Position -1,-1
size Size -1,-1
style Style[wxDialog] wxDEFAULT_FRAME_STYLE
title I18nString ""
icon Bitmap (empty)
centered Boolean false
wxFrame may have children objects. There can be at most one wxToolBar,
wxMenuBar and wxStatusBar children; objects of these types are automatically
set as frame's tool-, menu- and statusbar respectively.
wxScrolledWindow wxScrolledWindow
---------------- ----------------
position Position -1,-1 position Position -1,-1
size Size -1,-1 size Size -1,-1
style Style[wxScrolledWindow] wxHSCROLL | wxVSCROLL style Style[wxScrolledWindow] wxHSCROLL | wxVSCROLL
wxScolledWindow may have children objects.
wxSplitterWindow wxSplitterWindow
---------------- ----------------
@@ -325,11 +353,13 @@ and the splitter is created unsplit. If there are two children, the
splitter is created split, either horizontally or vertically depending splitter is created split, either horizontally or vertically depending
on the value of "orientation" attribute. on the value of "orientation" attribute.
wxStatusBar wxStatusBar
----------- -----------
fields Integer number of fields fields Integer number of fields
widths Width1, Width2, Width3, ... widths Width1, Width2, Width3, ...
wxToolBar wxToolBar
--------- ---------
position Position -1,-1 position Position -1,-1

View File

@@ -66,6 +66,8 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
dlg->SetClientSize(GetSize()); dlg->SetClientSize(GetSize());
if (HasParam(wxT("pos"))) if (HasParam(wxT("pos")))
dlg->Move(GetPosition()); dlg->Move(GetPosition());
if (HasParam(wxT("icon")))
dlg->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
SetupWindow(dlg); SetupWindow(dlg);

View File

@@ -71,6 +71,8 @@ wxObject *wxFrameXmlHandler::DoCreateResource()
frame->SetClientSize(GetSize()); frame->SetClientSize(GetSize());
if (HasParam(wxT("pos"))) if (HasParam(wxT("pos")))
frame->Move(GetPosition()); frame->Move(GetPosition());
if (HasParam(wxT("icon")))
frame->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
SetupWindow(frame); SetupWindow(frame);

View File

@@ -399,6 +399,9 @@ static bool NodeContainsFilename(wxXmlNode *node)
// Any bitmaps: // Any bitmaps:
if (node->GetName() == _T("bitmap")) if (node->GetName() == _T("bitmap"))
return true; return true;
if (node->GetName() == _T("icon"))
return true;
// URLs in wxHtmlWindow: // URLs in wxHtmlWindow:
if (node->GetName() == _T("url")) if (node->GetName() == _T("url"))