]> git.saurik.com Git - wxWidgets.git/commitdiff
added 'icon' property to wxFrame and wxDialog in XRC
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 31 Oct 2004 11:42:27 +0000 (11:42 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 31 Oct 2004 11:42:27 +0000 (11:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/tech/tn0014.txt
src/xrc/xh_dlg.cpp
src/xrc/xh_frame.cpp
utils/wxrc/wxrc.cpp

index 440a371d7eec4607e6ca419107e1fc598c7a921a..85525ddb92de419e2618696170aadc61fc6a6a12 100644 (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
 ----------------
 position                   Position                -1,-1
 size                       Size                    -1,-1
 style                      Style[wxScrolledWindow] wxHSCROLL | wxVSCROLL
 
 wxScrolledWindow
 ----------------
 position                   Position                -1,-1
 size                       Size                    -1,-1
 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
 on the value of "orientation" attribute.
 
 splitter is created split, either horizontally or vertically depending
 on the value of "orientation" attribute.
 
+
 wxStatusBar
 -----------
 fields                     Integer number of fields
 widths                     Width1, Width2, Width3, ...
 
 wxStatusBar
 -----------
 fields                     Integer number of fields
 widths                     Width1, Width2, Width3, ...
 
+
 wxToolBar
 ---------
 position                   Position                -1,-1
 wxToolBar
 ---------
 position                   Position                -1,-1
index eef07949ec13f492197f863e706d1275055d9a78..b377eab61c0d7851962daa0c70edac421005b43e 100644 (file)
@@ -66,6 +66,8 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
         dlg->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         dlg->Move(GetPosition());
         dlg->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         dlg->Move(GetPosition());
+    if (HasParam(wxT("icon")))
+        dlg->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
 
     SetupWindow(dlg);
 
 
     SetupWindow(dlg);
 
index 2685be16e06aeee8192317d869a7a5ef6e81fede..3b924e27d538031827e5e78b0e225ea941bb75b8 100644 (file)
@@ -71,6 +71,8 @@ wxObject *wxFrameXmlHandler::DoCreateResource()
         frame->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         frame->Move(GetPosition());
         frame->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         frame->Move(GetPosition());
+    if (HasParam(wxT("icon")))
+        frame->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
 
     SetupWindow(frame);
 
 
     SetupWindow(frame);
 
index 0660b7e176ed85c5c7b141f8ee84aa66d0925663..4600dd9860a4df8e02afbac2a4222558991fbda2 100644 (file)
@@ -399,6 +399,9 @@ static bool NodeContainsFilename(wxXmlNode *node)
    // Any bitmaps:
    if (node->GetName() == _T("bitmap"))
        return true;
    // Any bitmaps:
    if (node->GetName() == _T("bitmap"))
        return true;
+   
+   if (node->GetName() == _T("icon"))
+       return true;
 
    // URLs in wxHtmlWindow:
    if (node->GetName() == _T("url"))
 
    // URLs in wxHtmlWindow:
    if (node->GetName() == _T("url"))