34 : m_CallBack(callback)
73 catch (SquirrelError& e)
89 s_ActiveDialog =
new XrcDialog(
nullptr, dlgName, callback);
93 #if wxABI_VERSION > 20601 117 s_ActiveDialog->EndModal(retCode);
131 return sa.Return((SQInteger)-1);
135 if (sa.GetType(2) == OT_STRING)
136 win = wxWindow::FindWindowByName(
cbC2U(sa.GetString(2)), s_ActiveDialog);
138 win = wxWindow::FindWindowByName(*SqPlus::GetInstance<wxString,false>(v, 2), s_ActiveDialog);
139 return sa.Return((SQInteger)(win ? win->GetId() : -1));
144 SqPlus::RegisterGlobal(
ShowDialog,
"ShowDialog");
145 SqPlus::RegisterGlobal(
EndModal,
"EndModal");
146 SquirrelVM::CreateFunctionGlobal(
XrcId,
"XRCID",
"*");
void EndModal(int retCode)
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
Scripts folder in base dir.
Scripts folder in user's dir.
static wxString LocateDataFile(const wxString &filename, int search_dirs=sdAllKnown)
Locate a file in an installation- and platform-independent way.
DLLIMPORT const wxWX2MBbuf cbU2C(const wxString &str)
Return multibyte (C string) representation of the string.
DLLIMPORT wxString cbC2U(const char *str)
Return str as a proper unicode-compatible string.
int ShowDialog(const wxString &xrc, const wxString &dlgName, const wxString &callback)
LogManager * GetLogManager() const
void DisplayErrors(SquirrelError *exception=nullptr, bool clearErrors=true)
Display error dialog.
const wxString & _(const wxString &string)
XrcDialog * s_ActiveDialog
SQInteger XrcId(HSQUIRRELVM v)
void DebugLog(const wxString &msg, Logger::level lv=Logger::info)
bool Unload(const wxString &filename)
static wxXmlResource * Get()
ScriptingManager * GetScriptingManager() const
XrcDialog(wxWindow *parent, const wxString &dlgName, const wxString &callback)
Code::Blocks error handling unit.
static wxString Format(const wxString &format,...)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.