Refactor: extract XRC code handling conversion from dialog units.

Factor out this code to a reusable ParseValueInPixels() function instead of
repeating it in GetSize() and GetDimension() (and using a hack to reuse it
from GetPosition()).

No real changes, just made some error messages more precise.
This commit is contained in:
Vadim Zeitlin
2015-04-20 19:37:47 +02:00
parent 2ae7ed65e3
commit 4df7057302
2 changed files with 97 additions and 83 deletions

View File

@@ -585,6 +585,8 @@ public:
// Gets the value of a boolean attribute (only "0" and "1" are valid values)
bool GetBoolAttr(const wxString& attr, bool defaultv);
// Returns the window associated with the handler (may be NULL).
wxWindow* GetParentAsWindow() const { return m_handler->GetParentAsWindow(); }
// Sets common window options.
void SetupWindow(wxWindow *wnd);