]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/dialoged/src/reseditr.cpp
SetTitle() works even if menu was created without title initially (and setting
[wxWidgets.git] / utils / dialoged / src / reseditr.cpp
index ab4ff916019ad2c6c189207606f0a0e0f2383114..507ced9872bf1409f7420b7bc94a1f50e2adc567 100644 (file)
 #include "wx/gauge.h"
 #include "wx/slider.h"
 #include "wx/textctrl.h"
+#include "wx/menu.h"
+#include "wx/toolbar.h"
 #endif
 
 #include "wx/scrolbar.h"
+#include "wx/config.h"
 
 #include <ctype.h>
 #include <stdlib.h>
@@ -51,7 +54,9 @@
 #include <windows.h>
 #endif
 
+#ifdef __WXMSW__
 #include "wx/help.h"
+#endif
 
 #include "reseditr.h"
 #include "winprop.h"
 static void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event);
 wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL;
 
-#ifdef __X__
-#include "bitmaps/load.xbm"
-#include "bitmaps/save.xbm"
-#include "bitmaps/new.xbm"
-#include "bitmaps/vert.xbm"
-#include "bitmaps/alignt.xbm"
-#include "bitmaps/alignb.xbm"
-#include "bitmaps/horiz.xbm"
-#include "bitmaps/alignl.xbm"
-#include "bitmaps/alignr.xbm"
-#include "bitmaps/copysize.xbm"
-#include "bitmaps/tofront.xbm"
-#include "bitmaps/toback.xbm"
-#include "bitmaps/help.xbm"
-#include "bitmaps/wxwin.xbm"
+#ifdef __WXGTK__
+#include "bitmaps/load.xpm"
+#include "bitmaps/save.xpm"
+#include "bitmaps/new.xpm"
+#include "bitmaps/vert.xpm"
+#include "bitmaps/alignt.xpm"
+#include "bitmaps/alignb.xpm"
+#include "bitmaps/horiz.xpm"
+#include "bitmaps/alignl.xpm"
+#include "bitmaps/alignr.xpm"
+#include "bitmaps/copysize.xpm"
+#include "bitmaps/tofront.xpm"
+#include "bitmaps/toback.xpm"
+#include "bitmaps/help.xpm"
+#include "bitmaps/wxwin.xpm"
 #endif
 
 /*
@@ -100,8 +105,8 @@ wxResourceManager::wxResourceManager():
   m_editorToolBar = NULL;
 
   // Default window positions
-  m_resourceEditorWindowSize.width = 470;
-  m_resourceEditorWindowSize.height = 300;
+  m_resourceEditorWindowSize.width = 500;
+  m_resourceEditorWindowSize.height = 450;
 
   m_resourceEditorWindowSize.x = 0;
   m_resourceEditorWindowSize.y = 0;
@@ -109,7 +114,9 @@ wxResourceManager::wxResourceManager():
   m_propertyWindowSize.width = 300;
   m_propertyWindowSize.height = 300;
 
+#ifdef __WXMSW__
   m_helpController = NULL;
+#endif
 
   m_bitmapImage = NULL;
   m_rootDialogItem = 0;
@@ -120,12 +127,15 @@ wxResourceManager::~wxResourceManager()
   sm_currentResourceManager = NULL;
   SaveOptions();
 
+#ifdef __WXMSW__
   if (m_helpController)
   {
     m_helpController->Quit();
     delete m_helpController;
     m_helpController = NULL;
   }
+#endif  
+  
   delete m_bitmapImage;
   delete m_popupMenu;
 }
@@ -139,19 +149,19 @@ bool wxResourceManager::Initialize()
   GetWindowsDirectory(buf, 256);
   strcat(buf, "\\dialoged.ini");
   m_optionsResourceFilename = buf;
-#elif defined(__X__)
-  char buf[500];
-  wxGetHomeDir(buf);
-  strcat(buf, "/.dialogedrc");
-  m_optionsResourceFilename = buf;
+#elif defined(__WXGTK__)
+  wxGetHomeDir( &m_optionsResourceFilename );
+  m_optionsResourceFilename += "/.dialogedrc";
 #else
 #error "Unsupported platform."
 #endif
 
   LoadOptions();
 
+#ifdef __WXMSW__
   m_helpController = new wxHelpController;
   m_helpController->Initialize("dialoged");
+#endif
 
   m_popupMenu = new wxMenu("", (wxFunction)ObjectMenuProc);
   m_popupMenu->Append(OBJECT_MENU_EDIT, "Edit properties");
@@ -162,8 +172,8 @@ bool wxResourceManager::Initialize()
 #ifdef __WXMSW__
     m_bitmapImage = new wxBitmap("WXWINBMP", wxBITMAP_TYPE_BMP_RESOURCE);
 #endif
-#ifdef __X__
-    m_bitmapImage = new wxBitmap(wxwin_bits, wxwin_width, wxwin_height);
+#ifdef __WXGTK__
+    m_bitmapImage = new wxBitmap( wxwin_xpm );
 #endif
   }
 
@@ -186,6 +196,18 @@ bool wxResourceManager::Initialize()
 
 bool wxResourceManager::LoadOptions()
 {
+  wxConfig config("DialogEd", "wxWindows");
+
+  config.Read("editorWindowX", &m_resourceEditorWindowSize.x);
+  config.Read("editorWindowY", &m_resourceEditorWindowSize.y);
+  config.Read("editorWindowWidth", &m_resourceEditorWindowSize.width);
+  config.Read("editorWindowHeight", &m_resourceEditorWindowSize.height);
+  config.Read("propertyWindowX", &m_propertyWindowSize.x);
+  config.Read("propertyWindowY", &m_propertyWindowSize.y);
+  config.Read("propertyWindowWidth", &m_propertyWindowSize.width);
+  config.Read("propertyWindowHeight", &m_propertyWindowSize.height);
+
+  /*
   wxGetResource("DialogEd", "editorWindowX", &m_resourceEditorWindowSize.x, m_optionsResourceFilename.GetData());
   wxGetResource("DialogEd", "editorWindowY", &m_resourceEditorWindowSize.y, m_optionsResourceFilename.GetData());
   wxGetResource("DialogEd", "editorWindowWidth", &m_resourceEditorWindowSize.width, m_optionsResourceFilename.GetData());
@@ -194,11 +216,23 @@ bool wxResourceManager::LoadOptions()
   wxGetResource("DialogEd", "propertyWindowY", &m_propertyWindowSize.y, m_optionsResourceFilename.GetData());
   wxGetResource("DialogEd", "propertyWindowWidth", &m_propertyWindowSize.width, m_optionsResourceFilename.GetData());
   wxGetResource("DialogEd", "propertyWindowHeight", &m_propertyWindowSize.height, m_optionsResourceFilename.GetData());
+  */
   return TRUE;
 }
 
 bool wxResourceManager::SaveOptions()
 {
+  wxConfig config("DialogEd", "wxWindows");
+
+  config.Write("editorWindowX", m_resourceEditorWindowSize.x);
+  config.Write("editorWindowY", m_resourceEditorWindowSize.y);
+  config.Write("editorWindowWidth", m_resourceEditorWindowSize.width);
+  config.Write("editorWindowHeight", m_resourceEditorWindowSize.height);
+  config.Write("propertyWindowX", m_propertyWindowSize.x);
+  config.Write("propertyWindowY", m_propertyWindowSize.y);
+  config.Write("propertyWindowWidth", m_propertyWindowSize.width);
+  config.Write("propertyWindowHeight", m_propertyWindowSize.height);
+  /*
   wxWriteResource("DialogEd", "editorWindowX", m_resourceEditorWindowSize.x, m_optionsResourceFilename.GetData());
   wxWriteResource("DialogEd", "editorWindowY", m_resourceEditorWindowSize.y, m_optionsResourceFilename.GetData());
   wxWriteResource("DialogEd", "editorWindowWidth", m_resourceEditorWindowSize.width, m_optionsResourceFilename.GetData());
@@ -208,13 +242,14 @@ bool wxResourceManager::SaveOptions()
   wxWriteResource("DialogEd", "propertyWindowY", m_propertyWindowSize.y, m_optionsResourceFilename.GetData());
   wxWriteResource("DialogEd", "propertyWindowWidth", m_propertyWindowSize.width, m_optionsResourceFilename.GetData());
   wxWriteResource("DialogEd", "propertyWindowHeight", m_propertyWindowSize.height, m_optionsResourceFilename.GetData());
+  */
 
   return TRUE;
 }
 
 // Show or hide the resource editor frame, which displays a list
 // of resources with ability to edit them.
-bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *parent, const char *title)
+bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *WXUNUSED(parent), const char *title)
 {
   if (show)
   {
@@ -273,7 +308,12 @@ bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *parent, const ch
     c->right.SameAs      (m_editorFrame, wxRight, 0);
     c->bottom.SameAs     (m_editorFrame, wxBottom, 0);
     c->width.Unconstrained();
+#ifdef __WXGTK__
+    c->height.Absolute(140);
+#else
     c->height.Absolute(60);
+#endif
+
     m_editorControlList->SetConstraints(c);
 
     m_editorFrame->SetAutoLayout(TRUE);
@@ -413,7 +453,7 @@ bool wxResourceManager::New(bool loadFromFile, const wxString& filename)
         str += m_symbolFilename;
         str += ".\nDialog Editor maintains a header file containing id symbols to be used in the application.\n";
         str += "The next time this .wxr file is saved, a header file will be saved also.";
-        wxMessageBox(str, "Dialog Editor Warning", MB_OK);
+        wxMessageBox(str, "Dialog Editor Warning", wxOK );
 
         m_symbolIdCounter = 99;
     }
@@ -428,7 +468,8 @@ bool wxResourceManager::New(bool loadFromFile, const wxString& filename)
     bool altered = RepairResourceIds();
     if (altered)
     {
-        wxMessageBox("Some resources have had new identifiers associated with them, since they were missing.", "Dialog Editor Warning", MB_OK);
+        wxMessageBox("Some resources have had new identifiers associated with them, since they were missing.", 
+                    "Dialog Editor Warning", wxOK );
         Modify(TRUE);
     }
     else
@@ -446,7 +487,7 @@ bool wxResourceManager::New(bool loadFromFile, const wxString& filename)
   return TRUE;
 }
 
-bool wxResourceManager::Clear(bool deleteWindows, bool force)
+bool wxResourceManager::Clear(bool WXUNUSED(deleteWindows), bool force)
 {
   if (!force && Modified())
   {
@@ -646,13 +687,12 @@ wxFrame *wxResourceManager::OnCreateEditorFrame(const char *title)
 
   frame->SetAutoLayout(TRUE);
 #ifdef __WXMSW__
-  wxIcon *icon = new wxIcon("DIALOGEDICON");
-  frame->SetIcon(icon);
+  frame->SetIcon(wxIcon("DIALOGEDICON"));
 #endif
   return frame;
 }
 
-wxMenuBar *wxResourceManager::OnCreateEditorMenuBar(wxFrame *parent)
+wxMenuBar *wxResourceManager::OnCreateEditorMenuBar(wxFrame *WXUNUSED(parent))
 {
   wxMenuBar *menuBar = new wxMenuBar;
 
@@ -695,7 +735,7 @@ wxResourceEditorScrolledWindow *wxResourceManager::OnCreateEditorPanel(wxFrame *
   return panel;
 }
 
-wxToolBarBase *wxResourceManager::OnCreateToolBar(wxFrame *parent)
+wxToolBar *wxResourceManager::OnCreateToolBar(wxFrame *parent)
 {
   // Load palette bitmaps
 #ifdef __WXMSW__
@@ -713,20 +753,20 @@ wxToolBarBase *wxResourceManager::OnCreateToolBar(wxFrame *parent)
   wxBitmap ToolbarToFrontBitmap("TOFRONTTOOL");
   wxBitmap ToolbarHelpBitmap("HELPTOOL");
 #endif
-#ifdef __X__
-  wxBitmap ToolbarLoadBitmap(load_bits, load_width, load_height);
-  wxBitmap ToolbarSaveBitmap(save_bits, save_width, save_height);
-  wxBitmap ToolbarNewBitmap(new_bits, save_width, save_height);
-  wxBitmap ToolbarVertBitmap(vert_bits, vert_width, vert_height);
-  wxBitmap ToolbarAlignTBitmap(alignt_bits, alignt_width, alignt_height);
-  wxBitmap ToolbarAlignBBitmap(alignb_bits, alignb_width, alignb_height);
-  wxBitmap ToolbarHorizBitmap(horiz_bits, horiz_width, horiz_height);
-  wxBitmap ToolbarAlignLBitmap(alignl_bits, alignl_width, alignl_height);
-  wxBitmap ToolbarAlignRBitmap(alignr_bits, alignr_width, alignr_height);
-  wxBitmap ToolbarCopySizeBitmap(copysize_bits, copysize_width, copysize_height);
-  wxBitmap ToolbarToBackBitmap(toback_bits, toback_width, toback_height);
-  wxBitmap ToolbarToFrontBitmap(tofront_bits, tofront_width, tofront_height);
-  wxBitmap ToolbarHelpBitmap(help_bits, help_width, help_height);
+#ifdef __WXGTK__
+  wxBitmap ToolbarLoadBitmap( load_xpm );
+  wxBitmap ToolbarSaveBitmap( save_xpm);
+  wxBitmap ToolbarNewBitmap( new_xpm );
+  wxBitmap ToolbarVertBitmap( vert_xpm );
+  wxBitmap ToolbarAlignTBitmap( alignt_xpm );
+  wxBitmap ToolbarAlignBBitmap( alignb_xpm );
+  wxBitmap ToolbarHorizBitmap( horiz_xpm );
+  wxBitmap ToolbarAlignLBitmap( alignl_xpm );
+  wxBitmap ToolbarAlignRBitmap( alignr_xpm );
+  wxBitmap ToolbarCopySizeBitmap( copysize_xpm );
+  wxBitmap ToolbarToBackBitmap( toback_xpm );
+  wxBitmap ToolbarToFrontBitmap( tofront_xpm );
+  wxBitmap ToolbarHelpBitmap( help_xpm );
 #endif
 
   // Create the toolbar
@@ -738,7 +778,7 @@ wxToolBarBase *wxResourceManager::OnCreateToolBar(wxFrame *parent)
   int dx = 2;
   int gap = 6;
 #else
-  int width = ToolbarLoadBitmap->GetWidth();
+  int width = 24; // ToolbarLoadBitmap->GetWidth();  ???
   int dx = 2;
   int gap = 6;
 #endif
@@ -852,7 +892,7 @@ void wxResourceManager::AddItemsRecursively(long parent, wxItemResource *resourc
       node = node->Next();
     }
   }
-  m_editorResourceTree->ExpandItem(id, wxTREE_EXPAND_EXPAND);
+//  m_editorResourceTree->ExpandItem(id, wxTREE_EXPAND_EXPAND);
 }
 
 bool wxResourceManager::EditSelectedResource()
@@ -880,8 +920,8 @@ bool wxResourceManager::Edit(wxItemResource *res)
   }
   else
   {
-        long style = res->GetStyle();
-        res->SetStyle(style|wxRAISED_BORDER);
+//        long style = res->GetStyle();
+//        res->SetStyle(style|wxRAISED_BORDER);
         panel = new wxPanel;
         wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, res, panel->GetEventHandler(),
            this);
@@ -890,7 +930,7 @@ bool wxResourceManager::Edit(wxItemResource *res)
 
         panel->PushEventHandler(handler);
 
-        res->SetStyle(style);
+//        res->SetStyle(style);
                handler->AddChildHandlers(); // Add event handlers for all controls
         AssociateResource(res, panel);
 
@@ -993,17 +1033,17 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *
   else if (itemType == "wxMessage" || itemType == "wxStaticText")
     {
       prefix = "ID_STATIC";
-      MakeUniqueName("message", buf);
+      MakeUniqueName("statictext", buf);
       res->SetName(buf);
       if (isBitmap)
         newItem = new wxStaticBitmap(panel, -1, m_bitmapImage, wxPoint(x, y), wxSize(0, 0), 0, buf);
       else
-        newItem = new wxStaticText(panel, -1, "Message", wxPoint(x, y), wxSize(-1, -1), 0, buf);
+        newItem = new wxStaticText(panel, -1, "Static", wxPoint(x, y), wxSize(-1, -1), 0, buf);
     }
   else if (itemType == "wxStaticBitmap")
     {
       prefix = "ID_STATICBITMAP";
-      MakeUniqueName("message", buf);
+      MakeUniqueName("static", buf);
       res->SetName(buf);
       newItem = new wxStaticBitmap(panel, -1, m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, buf);
     }
@@ -1047,12 +1087,19 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *
       res->SetName(buf);
       newItem = new wxChoice(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf);
     }
+  else if (itemType == "wxComboBox")
+    {
+      prefix = "ID_COMBOBOX";
+      MakeUniqueName("combobox", buf);
+      res->SetName(buf);
+      newItem = new wxComboBox(panel, -1, "", wxPoint(x, y), wxSize(-1, -1), 0, NULL, wxCB_DROPDOWN, wxDefaultValidator, buf);
+    }
   else if (itemType == "wxGroupBox" || itemType == "wxStaticBox")
     {
       prefix = "ID_STATICBOX";
-      MakeUniqueName("group", buf);
+      MakeUniqueName("staticbox", buf);
       res->SetName(buf);
-      newItem = new wxStaticBox(panel, -1, "Groupbox", wxPoint(x, y), wxSize(200, 200), 0, buf);
+      newItem = new wxStaticBox(panel, -1, "Static", wxPoint(x, y), wxSize(200, 200), 0, buf);
     }
   else if (itemType == "wxGauge")
     {
@@ -1403,7 +1450,9 @@ bool wxResourceManager::DeleteResource(wxWindow *win)
     {
       RemoveSelection(item);
       childHandler->SelectItem(FALSE);
+#ifndef __WXGTK__
       item->GetParent()->Refresh();
+#endif
     }
   }
   
@@ -1702,8 +1751,12 @@ wxWindow *wxResourceManager::RecreateWindowFromResource(wxWindow *win, wxWindowP
   else
   {
     DisassociateResource(resource);
+    if (win->GetEventHandler() != win)
+        win->PopEventHandler(TRUE);
+
     DeleteWindow(win);
     newWin = m_resourceTable.CreateItem((wxPanel *)parent, resource);
+    newWin->PushEventHandler(new wxResourceEditorControlHandler((wxControl*) newWin, (wxControl*) newWin));
     AssociateResource(resource, newWin);
     UpdateResourceList();
   }
@@ -1860,6 +1913,10 @@ wxWindowPropertyInfo *wxResourceManager::CreatePropertyInfoForWindow(wxWindow *w
         {
           info = new wxChoicePropertyInfo(win);
         }
+  else if (win->IsKindOf(CLASSINFO(wxComboBox)))
+        {
+          info = new wxComboBoxPropertyInfo(win);
+        }
   else if (win->IsKindOf(CLASSINFO(wxButton)))
         {
           info = new wxButtonPropertyInfo(win);
@@ -1965,68 +2022,70 @@ wxResourceEditorFrame::~wxResourceEditorFrame()
 {
 }
 
-void wxResourceEditorFrame::OnNew(wxCommandEvent& event)
+void wxResourceEditorFrame::OnNew(wxCommandEvent& WXUNUSED(event))
 {
       manager->New(FALSE);
 }
 
-void wxResourceEditorFrame::OnNewDialog(wxCommandEvent& event)
+void wxResourceEditorFrame::OnNewDialog(wxCommandEvent& WXUNUSED(event))
 {
       manager->CreateNewPanel();
 }
 
-void wxResourceEditorFrame::OnOpen(wxCommandEvent& event)
+void wxResourceEditorFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
 {
       manager->New(TRUE);
 }
 
-void wxResourceEditorFrame::OnClear(wxCommandEvent& event)
+void wxResourceEditorFrame::OnClear(wxCommandEvent& WXUNUSED(event))
 {
       manager->Clear(TRUE, FALSE);
 }
 
-void wxResourceEditorFrame::OnSave(wxCommandEvent& event)
+void wxResourceEditorFrame::OnSave(wxCommandEvent& WXUNUSED(event))
 {
       manager->Save();
 }
 
-void wxResourceEditorFrame::OnSaveAs(wxCommandEvent& event)
+void wxResourceEditorFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event))
 {
       manager->SaveAs();
 }
 
-void wxResourceEditorFrame::OnExit(wxCommandEvent& event)
+void wxResourceEditorFrame::OnExit(wxCommandEvent& WXUNUSED(event))
 {
          manager->Clear(TRUE, FALSE) ;
       this->Close();
 }
 
-void wxResourceEditorFrame::OnAbout(wxCommandEvent& event)
+void wxResourceEditorFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
       char buf[300];
       sprintf(buf, "wxWindows Dialog Editor %.1f\nAuthor: Julian Smart J.Smart@ed.ac.uk\nJulian Smart (c) 1996", wxDIALOG_EDITOR_VERSION);
       wxMessageBox(buf, "About Dialog Editor", wxOK|wxCENTRE);
 }
 
-void wxResourceEditorFrame::OnTest(wxCommandEvent& event)
+void wxResourceEditorFrame::OnTest(wxCommandEvent& WXUNUSED(event))
 {
     manager->TestCurrentDialog(this);
 }
 
-void wxResourceEditorFrame::OnContents(wxCommandEvent& event)
+void wxResourceEditorFrame::OnContents(wxCommandEvent& WXUNUSED(event))
 {
+#ifdef __WXMSW__
       wxBeginBusyCursor();
       manager->GetHelpController()->LoadFile();
       manager->GetHelpController()->DisplayContents();
       wxEndBusyCursor();
+#endif
 }
 
-void wxResourceEditorFrame::OnDeleteSelection(wxCommandEvent& event)
+void wxResourceEditorFrame::OnDeleteSelection(wxCommandEvent& WXUNUSED(event))
 {
       manager->DeleteSelection();
 }
 
-void wxResourceEditorFrame::OnRecreateSelection(wxCommandEvent& event)
+void wxResourceEditorFrame::OnRecreateSelection(wxCommandEvent& WXUNUSED(event))
 {
       manager->RecreateSelection();
 }
@@ -2091,7 +2150,7 @@ void wxResourceEditorScrolledWindow::OnScroll(wxScrollEvent& event)
         m_childWindow->Move(m_marginX + (- x * 10), m_marginY + (- y * 10));
 }
 
-void wxResourceEditorScrolledWindow::OnPaint(wxPaintEvent& event)
+void wxResourceEditorScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
 
@@ -2153,10 +2212,19 @@ void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event)
  *
  */
 
+#ifdef __WXGTK__   // I don't dare to delete it...
+BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar)
+END_EVENT_TABLE()
+
+#else
+
 BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar)
        EVT_PAINT(EditorToolBar::OnPaint)
 END_EVENT_TABLE()
 
+#endif
+
 EditorToolBar::EditorToolBar(wxFrame *frame, const wxPoint& pos, const wxSize& size,
             long style):
   wxToolBar(frame, -1, pos, size, style)
@@ -2186,10 +2254,12 @@ bool EditorToolBar::OnLeftClick(int toolIndex, bool toggled)
     }
     case TOOLBAR_HELP:
     {
+#ifdef __WXMSW__
       wxBeginBusyCursor();
       manager->GetHelpController()->LoadFile();
       manager->GetHelpController()->DisplayContents();
       wxEndBusyCursor();
+#endif
       break;
     }
     case TOOLBAR_FORMAT_HORIZ:
@@ -2299,16 +2369,3 @@ void EditorToolBar::OnMouseEnter(int toolIndex)
   else frame->SetStatusText("");
 }
 
-void EditorToolBar::OnPaint(wxPaintEvent& event)
-{
-  wxToolBar::OnPaint(event);
-
-  wxPaintDC dc(this);
-  int w, h;
-  GetSize(&w, &h);
-  dc.SetPen(wxBLACK_PEN);
-  dc.SetBrush(wxTRANSPARENT_BRUSH);
-  dc.DrawLine(0, h-1, w, h-1);
-}
-
-