| 1 |
#ifndef IMPORTFROMFB_H |
| 2 |
#define IMPORTFROMFB_H |
| 3 |
|
| 4 |
#include "import_dlg.h" |
| 5 |
#include "wxc_widget.h" |
| 6 |
#include "wxgui_defs.h" |
| 7 |
#include <map> |
| 8 |
|
| 9 |
class wxWindow; |
| 10 |
class NotebookPageWrapper; |
| 11 |
|
| 12 |
class ImportFromwxFB |
| 13 |
{ |
| 14 |
static std::map<wxString, wxString> sm_eventMap; |
| 15 |
wxWindow* m_Parent; |
| 16 |
bool m_loadWhenDone; |
| 17 |
|
| 18 |
public: |
| 19 |
ImportFromwxFB(wxWindow* parent); |
| 20 |
~ImportFromwxFB(); |
| 21 |
|
| 22 |
bool ImportProject(ImportDlg::ImportFileData& data, const wxString& sourceFile = "") const; |
| 23 |
static wxString ConvertFBOptionsString(const wxString& content, const wxString& separator = ";"); |
| 24 |
static void ProcessBitmapProperty(const wxString& value, wxcWidget* wrapper, |
| 25 |
const wxString& property = PROP_BITMAP_PATH, const wxString& client_hint = ""); |
| 26 |
bool GetProject() const; |
| 27 |
static wxString GetEventtypeFromHandlerstub(const wxString& stub); |
| 28 |
|
| 29 |
bool IsLoadWhenDone() const { return m_loadWhenDone; } |
| 30 |
|
| 31 |
protected: |
| 32 |
bool ParseFile(wxXmlDocument& doc, wxcWidget::List_t& toplevels) const; |
| 33 |
wxcWidget* ParseNode(wxXmlNode* node, wxcWidget* parentwrapper, bool& alreadyParented) const; |
| 34 |
void GetSizeritemContents(const wxXmlNode* node, wxcWidget* wrapper) const; |
| 35 |
void GetGridBagSizerItem(const wxXmlNode* node, wxcWidget* wrapper) const; |
| 36 |
void GetBookitemContents(const wxXmlNode* node, NotebookPageWrapper* wrapper, int& depth) const; |
| 37 |
}; |
| 38 |
|
| 39 |
#endif // IMPORTFROMFB_H |