xmlres: added support for wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2000-07-26 21:49:18 +00:00
parent 10461e195f
commit 35a0184e7d
4 changed files with 33 additions and 11 deletions

View File

@@ -27,7 +27,7 @@
#include "wx/xml/xml.h" #include "wx/xml/xml.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/wx.h"
#include "editor.h" #include "editor.h"

View File

@@ -24,6 +24,8 @@
#include "wx/splitter.h" #include "wx/splitter.h"
#include "wx/config.h" #include "wx/config.h"
#include "wx/dir.h" #include "wx/dir.h"
#include "wx/listctrl.h"
#include "wx/imaglist.h"
#include "treedt.h" #include "treedt.h"
#include "editor.h" #include "editor.h"
@@ -114,6 +116,8 @@ END_EVENT_TABLE()
#include "bitmaps/vsizer.xpm" #include "bitmaps/vsizer.xpm"
#include "bitmaps/hsizer.xpm" #include "bitmaps/hsizer.xpm"
#include "bitmaps/panel.xpm" #include "bitmaps/panel.xpm"
#include "bitmaps/gsizer.xpm"
#include "bitmaps/resicon.xpm"
#include "bitmaps/unused.xpm" #include "bitmaps/unused.xpm"
#include "bitmaps/used.xpm" #include "bitmaps/used.xpm"
@@ -170,10 +174,8 @@ EditorFrame::EditorFrame(wxFrame *parent, const wxString& filename)
// Create toolbar: // Create toolbar:
wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT); wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT);
#ifdef __WXMSW__
toolBar->SetToolBitmapSize(wxSize(24, 24));
#endif
toolBar->SetMargins(2, 2); toolBar->SetMargins(2, 2);
toolBar->SetToolBitmapSize(wxSize(24, 24));
toolBar -> AddTool(ID_EXIT, wxBITMAP(close), wxNullBitmap, toolBar -> AddTool(ID_EXIT, wxBITMAP(close), wxNullBitmap,
FALSE, -1, -1, (wxObject *) NULL, FALSE, -1, -1, (wxObject *) NULL,
_("Quit the editor")); _("Quit the editor"));
@@ -205,6 +207,8 @@ EditorFrame::EditorFrame(wxFrame *parent, const wxString& filename)
m_ImgList->Add(wxICON(panel)); m_ImgList->Add(wxICON(panel));
m_ImgList->Add(wxICON(vsizer)); m_ImgList->Add(wxICON(vsizer));
m_ImgList->Add(wxICON(hsizer)); m_ImgList->Add(wxICON(hsizer));
m_ImgList->Add(wxICON(gsizer));
m_ImgList->Add(wxICON(resicon));
m_TreeCtrl->SetImageList(m_ImgList); m_TreeCtrl->SetImageList(m_ImgList);
@@ -422,7 +426,7 @@ void EditorFrame::RefreshTree()
wxXmlNode *sel = m_SelectedNode; wxXmlNode *sel = m_SelectedNode;
m_TreeCtrl->DeleteAllItems(); m_TreeCtrl->DeleteAllItems();
wxTreeItemId root = m_TreeCtrl->AddRoot("Resource: " + m_FileName); wxTreeItemId root = m_TreeCtrl->AddRoot("Resource: " + m_FileName, 5, 5);
wxXmlNode *n = m_Resource->GetRoot()->GetChildren(); wxXmlNode *n = m_Resource->GetRoot()->GetChildren();
while (n) while (n)

View File

@@ -15,20 +15,25 @@
#define _EDITOR_H_ #define _EDITOR_H_
class wxXmlNode;
class WXDLLEXPORT wxTreeCtrl;
class WXDLLEXPORT wxScrolledWindow;
class WXDLLEXPORT wxSplitterWindow;
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/treectrl.h" #include "wx/treectrl.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/listctrl.h" #include "wx/listctrl.h"
class wxXmlNode;
class wxTreeCtrl;
class wxScrolledWindow;
class wxSplitterWindow;
class NodeHandler; class NodeHandler;
class wxXmlNode; class wxXmlNode;
class wxXmlDocument; class wxXmlDocument;
class EditorTreeCtrl; class EditorTreeCtrl;
class wxTreeCtrl;
class wxListCtrl;
class wxTreeItemId;
class wxImageList;
class wxTreeEvent;
class wxListEvent;
enum ChangeType enum ChangeType
{ {

View File

@@ -1,2 +1,15 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc" #include "wx/msw/wx.rc"
close BITMAP bitmaps/close.bmp
open BITMAP bitmaps/open.bmp
preview BITMAP bitmaps/preview.bmp
save BITMAP bitmaps/save.bmp
control ICON bitmaps/control.ico
hsizer ICON bitmaps/hsizer.ico
vsizer ICON bitmaps/vsizer.ico
panel ICON bitmaps/panel.ico
unused ICON bitmaps/unused.ico
used ICON bitmaps/used.ico
resicon ICON bitmaps/resicon.ico
gsizer ICON bitmaps/gsizer.ico