]> Creatis software - bbtk.git/blob - kernel/src/bbtkWxGUITextEditor.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxGUITextEditor.cxx
1 /*=========================================================================                                                                               
2   Program:   bbtk
3   Module:    $RCSfile: bbtkWxGUITextEditor.cxx,v $
4   Language:  C++
5   Date:      $Date: 2008/10/17 08:18:15 $
6   Version:   $Revision: 1.18 $
7 =========================================================================*/
8
9 /* ---------------------------------------------------------------------
10
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
13 *
14 *  This software is governed by the CeCILL-B license under French law and 
15 *  abiding by the rules of distribution of free software. You can  use, 
16 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
17 *  license as circulated by CEA, CNRS and INRIA at the following URL 
18 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
19 *  or in the file LICENSE.txt.
20 *
21 *  As a counterpart to the access to the source code and  rights to copy,
22 *  modify and redistribute granted by the license, users are provided only
23 *  with a limited warranty  and the software's author,  the holder of the
24 *  economic rights,  and the successive licensors  have only  limited
25 *  liability. 
26 *
27 *  The fact that you are presently reading this means that you have had
28 *  knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */                                                                         
30
31
32 /**
33  * \brief Short description in one line
34  * 
35  * Long description which 
36  * can span multiple lines
37  */
38 /**
39  * \file 
40  * \brief 
41  */
42 /**
43  * \class bbtk::
44  * \brief 
45  */
46
47
48 #ifdef _USE_WXWIDGETS_
49
50 #include <iostream>     
51 #include "bbtkWxGUITextEditor.h"
52 #include "bbtkWxBlackBox.h"
53 #include "bbtkConfigurationFile.h"
54 #include "bbtkUtilities.h"
55
56 //#include "icons/cc_new.xpm"
57 //#include "icons/cc_open.xpm"
58 //#include "icons/cc_stop.xpm"
59 //#include "icons/cc_save.xpm"
60 //#include "icons/cc_save_as.xpm"
61 //#include "icons/cc_run.xpm"
62 //#include "icons/cc_exit.xpm"
63
64 #include "../data/icons/wxart_new.xpm"
65 #include "../data/icons/wxart_fileopen.xpm"
66 #include "../data/icons/wxart_filesave.xpm"
67 #include "../data/icons/wxart_filesaveas.xpm"
68 //#include "../data/icons/wxart_exefile.xpm"
69 //#include "../data/icons/wxart_delete.xpm"
70 #include "../data/icons/wxart_down.xpm"
71 #include "../data/icons/wxart_eldel.xpm"
72
73 namespace bbtk
74 {
75
76
77   //================================================================
78   class WxTextCtrlGettingKeyEvents : public wxTextCtrl
79   {
80   public:
81     WxTextCtrlGettingKeyEvents(wxWindow *parent, wxWindowID id, const wxString &value,
82                                const wxPoint &pos, const wxSize &size, int style = 0)
83       : wxTextCtrl(parent, id, value, pos, size, style)
84     {
85     }
86     
87     void SetWxGUITextEditor(WxGUITextEditor* e) 
88     { mWxGUITextEditor = e; }
89     
90     void OnKeyDown(wxKeyEvent& event);
91     void OnKeyUp(wxKeyEvent& event);
92     void OnChar(wxKeyEvent& event);
93   private :
94     WxGUITextEditor* mWxGUITextEditor;
95     
96     DECLARE_EVENT_TABLE()
97       };
98   
99   BEGIN_EVENT_TABLE(WxTextCtrlGettingKeyEvents, wxTextCtrl)
100     EVT_KEY_DOWN(WxTextCtrlGettingKeyEvents::OnKeyDown)
101     EVT_KEY_UP(WxTextCtrlGettingKeyEvents::OnKeyUp)
102     EVT_CHAR(WxTextCtrlGettingKeyEvents::OnChar)
103     END_EVENT_TABLE()
104     
105     
106     void WxTextCtrlGettingKeyEvents::OnChar(wxKeyEvent& event)
107   {
108     event.Skip();
109   }
110   
111   void WxTextCtrlGettingKeyEvents::OnKeyUp(wxKeyEvent& event)
112   {
113     mWxGUITextEditor->OnKeyUp(event);
114     event.Skip();
115   }
116   
117   void WxTextCtrlGettingKeyEvents::OnKeyDown(wxKeyEvent& event)
118   {
119     mWxGUITextEditor->OnKeyDown(event);
120     event.Skip();
121   }
122   //================================================================
123   
124   
125   //================================================================  
126   /*  BEGIN_EVENT_TABLE(WxGUITextEditorPage, wxPanel)
127     EVT_CLOSE(WxGUITextEditorPage::OnClose)
128     END_EVENT_TABLE()
129   */
130  
131   //================================================================
132   WxGUITextEditorPage::WxGUITextEditorPage(wxWindow* parent,
133                                                WxGUITextEditor* editor)
134     : wxPanel(parent,-1),
135       mEditor(editor),
136       mName(""),
137       mAskFilename(true)
138   {  
139
140           //      std::cout << "WxGUITextEditorPage::WxGUITextEditorPage("<<mName<<")"<<std::endl;
141
142     wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
143  
144     mwxInputText = 
145                 
146       new WxTextCtrlGettingKeyEvents(this,
147                                      -1, //ID_InputText,
148                                      _T(""),
149                                      wxDefaultPosition,
150                                      wxDefaultSize,
151                                      wxTE_MULTILINE 
152                                      //    |wxTE_PROCESS_ENTER
153                                      //| wxTE_PROCESS_TAB 
154                                      //             | wxWANTS_CHARS 
155                                     // |  wxTAB_TRAVERSAL
156                                      );
157     mwxInputText->SetWxGUITextEditor(mEditor);
158     /*
159         new wxTextCtrl(this,-1,_T(""),
160                 wxDefaultPosition,
161                                              wxDefaultSize,
162                                              wxTE_MULTILINE 
163                                              //    |wxTE_PROCESS_ENTER
164                                         //       | wxTE_PROCESS_TAB 
165                                 //                  | wxWANTS_CHARS 
166                                  //    |  wxTAB_TRAVERSAL
167                                      );
168                                          */
169     wxFont* FixedFont = new wxFont(10,
170                                    wxFONTFAMILY_MODERN,
171                                    wxFONTSTYLE_NORMAL,
172                                    wxFONTWEIGHT_NORMAL,
173                                    false);
174     
175     mwxInputTextAttr = new wxTextAttr;
176     mwxInputTextAttr->SetFont(*FixedFont);
177    
178     sizer->Add(mwxInputText,1,wxGROW);
179     SetSizer(sizer);
180     SetAutoLayout(true);
181     Layout();
182   }
183   //================================================================
184
185   //================================================================
186   WxGUITextEditorPage::~WxGUITextEditorPage()
187   {
188   }
189   //================================================================
190
191   bool WxGUITextEditorPage::IsModified()
192    { return mwxInputText->IsModified(); }
193
194   std::string WxGUITextEditorPage::GetText()
195   {
196     return wx2std(GetTextCtrl()->GetValue());
197   }
198
199   //================================================================
200   void WxGUITextEditorPage::Load(const std::string& filename)
201   {
202     //    std::cout << "-------------- LOAD ---------------"<<std::endl;
203     //    std::cout << "'" << filename << "'"<<std::endl;
204     //std::string oldFilename = mFilename;
205     mName = filename;
206     mAskFilename = false;
207     mwxInputText->LoadFile(std2wx(mName));
208   }
209   //================================================================
210
211   //================================================================
212   void WxGUITextEditorPage::Save(const std::string& filter)
213   {
214     //    std::cout << "-------------- SAVE ---------------"<<std::endl;
215     if (mAskFilename)
216       {
217         wxFileDialog* fd = new wxFileDialog(this,_T("Save file"),_T(""),
218                                             _T(""),std2wx(filter),
219                                             wxSAVE | wxOVERWRITE_PROMPT );
220         int result_fd = fd->ShowModal();
221     
222         // This line is need it by windows // EED
223         fd->SetReturnCode( result_fd );
224
225         if (fd->GetReturnCode()==wxID_OK)
226           {
227             mName = wx2std(fd->GetPath());
228             mAskFilename = false;
229           }
230         else 
231           {
232             //      std::cout << "-------------- CANCELLED ---------------"
233             //                <<std::endl;
234             return;
235           } 
236       }
237     //    std::cout << "file [" << mName << "]" <<std::endl;
238     mwxInputText->SaveFile(std2wx(mName));
239     mwxInputText->SetModified(false);
240   }
241   //================================================================
242   
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264   //================================================================
265   // WxGUITextEditor
266   //================================================================
267
268
269   //================================================================
270   WxGUITextEditor::WxGUITextEditor( wxWindow *parent,
271                                     WxGUITextEditorUser* user )
272     : wxPanel(parent, -1),
273       mUser(user),
274       mFileNameFilter("*.*")
275   {
276   //  m_mgr.SetManagedWindow(this);
277                     //    wxInitAllImageHandlers();
278      
279         //  std::cout << "WxGUITextEditor::WxGUITextEditor"<<std::endl;
280
281       wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
282
283     mwxNotebook = new wxNotebook(this,-1,
284                 wxDefaultPosition, wxDefaultSize, 
285                 wxNB_TOP 
286
287                 
288                 );
289                 
290    sizer->Add(mwxNotebook,1,wxGROW);
291
292                 
293                 /*
294    mwxNotebook =                new wxAuiNotebook(this,  
295                                     -1,
296                                     wxPoint(0, 0),
297                                     wxSize(500,500),
298                                     wxAUI_NB_TAB_SPLIT 
299                                     | wxAUI_NB_TAB_MOVE
300                                     | wxAUI_NB_TAB_EXTERNAL_MOVE
301                                     | wxAUI_NB_WINDOWLIST_BUTTON
302                                     |wxAUI_NB_SCROLL_BUTTONS
303                                     // | wxAUI_NB_CLOSE_BUTTON 
304                                     | wxAUI_NB_CLOSE_ON_ACTIVE_TAB
305                                     //| wxAUI_NB_CLOSE_ON_ALL_TABS
306                                     | wxNO_BORDER);
307     
308     m_mgr.AddPane(mwxNotebook,
309                   wxAuiPaneInfo().Name(wxT("notebook"))
310                   .Caption(wxT(""))
311                   .CaptionVisible(false)
312                   .MinimizeButton(false)
313                   .MaximizeButton(false)
314                   .CloseButton(false)
315                   //              .Dockable(false).Float()
316                   .Center()
317                   .MinSize(wxSize(100,50))
318                   );   
319 */
320  
321     /*   
322     wxBitmap bmp_new(cc_new_xpm);
323     wxBitmap bmp_open(cc_open_xpm);
324     wxBitmap bmp_close(cc_stop_xpm);
325     wxBitmap bmp_save(cc_save_xpm);
326     wxBitmap bmp_saveas(cc_save_as_xpm);
327     wxBitmap bmp_run(cc_run_xpm);
328     */
329     wxBitmap bmp_new(new_xpm);
330     wxBitmap bmp_open(fileopen_xpm);
331     wxBitmap bmp_close(eldel_xpm);
332     wxBitmap bmp_save(filesave_xpm);
333     wxBitmap bmp_saveas(filesaveas_xpm);
334     wxBitmap bmp_run(down_xpm);
335
336     mwxToolBar = new wxToolBar(this, wxID_ANY, 
337                                wxDefaultPosition, wxDefaultSize,
338                                wxTB_FLAT | wxTB_NODIVIDER);
339     
340     mwxToolBar->AddTool(ID_ButtonNew, _T("New"),
341                      bmp_new, wxNullBitmap, wxITEM_NORMAL,
342                      _T("New file"), _T("Create a new file"));
343     mwxToolBar->AddTool(ID_ButtonOpen, _T("Open"),
344                      bmp_open, wxNullBitmap, wxITEM_NORMAL,
345                      _T("Open file"), _T("This is help for new file tool"));
346     mwxToolBar->AddTool(ID_ButtonClose, _T("Close"),
347                      bmp_close, wxNullBitmap, wxITEM_NORMAL,
348                      _T("Close file"), _T("Close current file"));
349     mwxToolBar->AddTool(ID_ButtonSave, _T("New"),
350                      bmp_save, wxNullBitmap, wxITEM_NORMAL,
351                      _T("Save file"), _T("Save current file"));
352     mwxToolBar->AddTool(ID_ButtonSaveAs, _T("New"),
353                      bmp_saveas, wxNullBitmap, wxITEM_NORMAL,
354                      _T("Save file as"), _T("Save current file as"));
355     mwxToolBar->AddTool(ID_ButtonRun, _T("Run"),
356                      bmp_run, wxNullBitmap, wxITEM_NORMAL,
357                      _T("Run file"), _T("Run current file"));
358  
359     mwxToolBar->AddSeparator();
360     mwxPosition = new wxStaticText ( mwxToolBar, -1, _T(""));
361     mwxToolBar->AddControl(mwxPosition);
362     mwxToolBar->Realize();
363
364           sizer->Add(mwxToolBar,0,wxGROW);
365
366         /*
367     m_mgr.AddPane(mwxToolBar, 
368                   wxAuiPaneInfo().Name(wxT("toolBar"))
369                   .Caption(wxT(""))
370                   .ToolbarPane()
371                   .Bottom()
372                   .MinSize(wxSize(100,50))
373                   .LeftDockable(false).RightDockable(false)
374                   );   
375 */
376   SetSizer(sizer);
377   
378     
379 //    m_mgr.Update();
380     SetAutoLayout(true);
381     Layout();
382
383     NewPage("");
384     UpdateInfo();
385
386   }
387   //================================================================
388   
389   //================================================================
390   WxGUITextEditor::~WxGUITextEditor()
391   {
392   //  m_mgr.UnInit();
393
394     //    delete mInterpreter;
395   }
396   //================================================================
397
398   //================================================================
399   void WxGUITextEditor::NewPage(const std::string& filename)
400   {
401    WxGUITextEditorPage* page = 
402       new WxGUITextEditorPage(mwxNotebook,this);
403     std::string name("untitled");
404     if (filename.size()!=0) 
405       {
406         name = filename;
407         page->Load(name);
408       }
409     page->SetPageName(name);
410     std::string fname = Utilities::get_file_name(name);
411     mwxNotebook->AddPage(page,std2wx(fname),true);
412     FocusOnCurrentPage();
413   }
414   //================================================================
415
416   //================================================================
417   WxGUITextEditorPage* WxGUITextEditor::GetCurrentPage()
418   {
419     return (WxGUITextEditorPage*)
420       mwxNotebook->GetPage(mwxNotebook->GetSelection());
421   }
422   //================================================================
423
424   //================================================================
425   void WxGUITextEditor::FocusOnCurrentPage()
426   {
427     if (mwxNotebook->GetPageCount()==0) return;
428     GetCurrentPage()->SetFocus();    
429   }
430   //================================================================
431
432   //================================================================  
433   void WxGUITextEditor::OnToolLeftClick(wxCommandEvent& event)
434   {
435     switch (event.GetId())
436       {
437       case ID_ButtonNew :
438         New(); 
439         FocusOnCurrentPage();
440         break;
441       case ID_ButtonOpen :
442         Open(); 
443         FocusOnCurrentPage();
444         break;
445       case ID_ButtonClose :
446         CloseCurrentPage();
447         break;
448       case ID_ButtonSave :
449         SaveCurrentPage();
450         break;
451       case ID_ButtonSaveAs :
452         if (mwxNotebook->GetPageCount()==0) break;  
453         GetCurrentPage()->SetAskFilename(true);
454         SaveCurrentPage();
455         break;
456       case ID_ButtonRun :
457         if ((mUser!=0) && (mwxNotebook->GetPageCount()>0)) 
458           mUser->WxGUITextEditorRun();
459         FocusOnCurrentPage();
460         break;
461       }
462   }
463   //================================================================  
464
465   //================================================================  
466   void WxGUITextEditor::OnToolRightClick(wxCommandEvent& event)
467   {
468   }
469   //================================================================  
470
471   //================================================================  
472   void WxGUITextEditor::New()
473   {
474     NewPage("");
475     UpdateInfo();
476   }
477   //================================================================
478
479   //================================================================  
480   void WxGUITextEditor::Open()
481   {
482     //    std::cout << "-------------- OPEN ---------------"<<std::endl;
483
484     wxFileDialog* fd = new wxFileDialog(this,_T("Open file"),_T(""),
485                                         _T(""),std2wx(mFileNameFilter),
486                                         wxOPEN | wxFILE_MUST_EXIST );
487     int result_fd = fd->ShowModal();
488
489         // This line is need it by windows //EED
490         fd->SetReturnCode( result_fd );
491
492     if (fd->GetReturnCode()==wxID_OK)
493       {
494         std::string filename = wx2std(fd->GetPath());
495         std::cout << "file [" << filename << "]" <<std::endl;
496         Open(filename);
497       }
498     else 
499       {
500         //      std::cout << "-------------- CANCELLED ---------------"<<std::endl;
501       }
502   }
503   //================================================================  
504   
505   //================================================================  
506   void WxGUITextEditor::Open(const std::string& filename)
507   {
508     NewPage(filename);
509     UpdateInfo();
510   }
511   //================================================================  
512
513
514   //================================================================  
515   bool WxGUITextEditor::CloseCurrentPage()
516   {
517     if (mwxNotebook->GetPageCount()==0) return true;
518
519     if (GetCurrentPage()->IsModified()) 
520       {
521         wxString mess = std2wx(GetCurrentPage()->GetPageName());
522         mess += _T(" modified. Save it ?");
523         wxMessageDialog* d = 
524           new wxMessageDialog(this,
525                               mess, 
526                               _T("Save buffer"), 
527                               wxYES_NO | wxCANCEL | wxICON_QUESTION);
528         switch (d->ShowModal())
529           {
530           case wxID_CANCEL : 
531             return false;
532             break;
533           case wxID_YES : 
534             GetCurrentPage()->Save(mFileNameFilter); 
535             break;
536           case wxID_NO : ;
537           }       
538       } 
539     mwxNotebook->DeletePage(mwxNotebook->GetSelection());
540     FocusOnCurrentPage();
541     return true;
542   }
543   //================================================================  
544
545   //================================================================  
546   bool WxGUITextEditor::CloseAllPages()
547   {
548     bool ok = true;
549     while (mwxNotebook->GetPageCount()!=0)
550       {
551         if (!CloseCurrentPage()) 
552           {
553             ok = false;
554             break;
555           }
556       }
557     return ok;
558   }
559   //================================================================  
560
561   //================================================================  
562   void WxGUITextEditor::SaveCurrentPage()
563   {
564     if (mwxNotebook->GetPageCount()==0) return;  
565     GetCurrentPage()->Save(mFileNameFilter);
566     mwxNotebook->SetPageText(mwxNotebook->GetSelection(),
567                              std2wx(GetCurrentPage()->GetPageName()));
568   }
569   //================================================================  
570
571
572   //================================================================  
573   void WxGUITextEditor::OnPageClose(wxAuiNotebookEvent& evt)
574   {
575     if (!CloseCurrentPage()) evt.Veto();
576   }
577   //================================================================
578
579
580
581   /*
582   //================================================================  
583   void WxGUITextEditor::OnButtonQuit(wxCommandEvent& event) 
584   { 
585     Quit(); 
586     FocusOnCurrentPage();
587   }
588   void WxGUITextEditor::Quit()
589   {
590     std::cout << "-------------- QUIT ---------------"<<std::endl;
591     if (AskSave()) GetParent()->Close();
592   }
593   //================================================================  
594   */
595
596   //================================================================  
597
598   /*
599   void WxGUITextEditor::Run()
600   {
601     std::cout << "-------------- RUN ---------------"<<std::endl;
602
603     if (!mwxSplit->IsSplit()) 
604       {
605         int size = -100;
606         int minsize = - (int)(mwxInputText->GetSize().GetHeight() / 2.);
607         if (size<minsize) size = minsize;
608         mwxSplit->SplitHorizontally( mwxInputText, mwxOutputText, size);
609       }
610
611     std::stringstream* buffer = new std::stringstream(bbtk::wx2std(mwxInputText->GetValue()));
612     mInterpreter->InterpretLine("reset");
613     try 
614       {
615         mInterpreter->InterpretBuffer(buffer);
616       }
617     catch (...)
618       {
619       }
620   } 
621   //================================================================  
622 */
623   
624  
625   
626   //================================================================
627   
628
629   //================================================================
630   void WxGUITextEditor::UpdateInfo()
631   {
632     if (mwxNotebook->GetPageCount()==0) return;
633     WxTextCtrlGettingKeyEvents* text = GetCurrentPage()->GetTextCtrl();
634     
635     long line, column, pos;
636     pos = text->GetInsertionPoint();
637     text->PositionToXY(pos, &column, &line);
638     
639     
640     //                wxLogMessage(_T("Current position: %ld\nCurrent line, column: (%ld, %ld)\nNumber of lines: %ld\nCurrent line length: %ld\nTotal text length: %u (%ld)"),
641     
642     
643     char mess[200];
644     sprintf(mess,"%ld:%ld/%ld:%ld",
645             line+1,column+1,
646             (long)text->GetNumberOfLines(),
647             (long)text->GetLineLength(line)+1);
648     //       pos+1,
649     //       (long)mwxInputText->GetValue().length())+1;
650     
651    // mwxPosition->SetLabel(wxString(mess));
652     mwxPosition->SetLabel(std2wx(mess));    
653     mwxPosition->Show();
654     
655     if (text->IsModified()) 
656       {
657         std::string title("*");
658         title += GetCurrentPage()->GetPageName();
659         mwxNotebook->SetPageText(mwxNotebook->GetSelection(),std2wx(title));
660       }
661   }
662   //================================================================
663   //================================================================
664   void WxGUITextEditor::OnKeyUp(wxKeyEvent& event)
665   {
666   //    std::cout << "U" << std::endl;
667     UpdateInfo();
668   }
669   //================================================================
670
671   //================================================================
672   void WxGUITextEditor::OnKeyDown(wxKeyEvent& event)
673   {
674      //   std::cout << "D" << std::endl;
675     // std::cout << "Key="<<event.GetKeyCode()<<std::endl;
676     if ( event.ControlDown() )
677       {
678         switch (event.GetKeyCode())
679           {
680           case 'n': case 'N' : New(); break;
681           case 's': case 'S' : SaveCurrentPage(); break;
682           case 'o': case 'O' : Open(); break;
683             //    case 'r': case 'R' : Run(); break;
684             //    case 'q': case 'Q' : Quit(); break;
685           }
686       }
687   }
688   //================================================================
689   
690   //================================================================  
691   BEGIN_EVENT_TABLE(WxGUITextEditor, wxPanel)
692     EVT_MENU(wxID_ANY,  WxGUITextEditor::OnToolLeftClick)
693     EVT_TOOL_RCLICKED(wxID_ANY,  WxGUITextEditor::OnToolRightClick)
694     EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, WxGUITextEditor::OnPageClose)
695     END_EVENT_TABLE()
696   //================================================================
697     
698
699
700
701   
702   //================================================================
703   WxGUITextEditorWindow::WxGUITextEditorWindow( wxWindow *parent, 
704                                                     wxString title, 
705                                                     wxSize size)
706     : wxFrame((wxFrame *)parent, -1, title, wxDefaultPosition, size)
707   {     
708     
709     
710     wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
711
712     mEditor = new WxGUITextEditor(this);
713     sizer->Add(mEditor,1,wxGROW);
714     
715     //    WxGUICommand* com = new WxGUICommand(this,this);
716     //    sizer->Add(com);
717     
718     SetSizer(sizer);
719
720     // parent window of all bbtk windows will be a child of this
721     Wx::SetTopWindowParent(this);
722     // Add the method OnWxSignal as a Wx::Signal observer 
723     //bbtkAddWxSignalObserver(WxGUITextEditorWindow::OnWxSignal);
724     
725    
726     SetAutoLayout(true);
727     Layout();
728   }
729   //================================================================
730
731   //================================================================
732   WxGUITextEditorWindow::~WxGUITextEditorWindow()
733   {
734   }
735   //================================================================
736
737
738 } // namespace bbtk
739
740
741 #endif //_USE_WXWIDGETS_