X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2822ee33cc96a9e0ce729aea08150daa239e67a6..89894079c04bba0ab2fd9efcb421516fc90545cb:/src/common/cmdline.cpp diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 6fc133bc4e..40700df5af 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -37,6 +37,8 @@ #include "wx/filefn.h" #endif //WX_PRECOMP +#include + #include "wx/datetime.h" #include "wx/cmdline.h" @@ -77,7 +79,7 @@ struct wxCmdLineOption // types increases, so always use the accessor functions and don't access // the fields directly!) - void Check(wxCmdLineParamType typ) const + void Check(wxCmdLineParamType WXUNUSED_UNLESS_DEBUG(typ)) const { wxASSERT_MSG( type == typ, _T("type mismatch in wxCmdLineOption") ); } @@ -142,8 +144,8 @@ struct wxCmdLineParserData { // options wxString m_switchChars; // characters which may start an option - bool m_enableLongOptions; // TRUE if long options are enabled + wxString m_logo; // some extra text to show in Usage() // cmd line data wxArrayString m_arguments; // == argv, argc == m_arguments.GetCount() @@ -188,7 +190,7 @@ void wxCmdLineParserData::SetArguments(int argc, char **argv) } } -void wxCmdLineParserData::SetArguments(const wxString& cmdline) +void wxCmdLineParserData::SetArguments(const wxString& WXUNUSED(cmdline)) { // either use wxMSW wxApp::ConvertToStandardCommandArgs() or move its logic // here and use this method from it - but don't duplicate the code @@ -264,6 +266,11 @@ void wxCmdLineParser::EnableLongOptions(bool enable) m_data->m_enableLongOptions = enable; } +void wxCmdLineParser::SetLogo(const wxString& logo) +{ + m_data->m_logo = logo; +} + // ---------------------------------------------------------------------------- // command line construction // ---------------------------------------------------------------------------- @@ -275,7 +282,8 @@ void wxCmdLineParser::SetDesc(const wxCmdLineEntryDesc *desc) switch ( desc->kind ) { case wxCMD_LINE_SWITCH: - AddSwitch(desc->shortName, desc->longName, desc->description); + AddSwitch(desc->shortName, desc->longName, desc->description, + desc->flags); break; case wxCMD_LINE_OPTION: @@ -842,6 +850,11 @@ void wxCmdLineParser::Usage() } } + if ( !!m_data->m_logo ) + { + wxLogMessage(m_data->m_logo); + } + wxLogMessage(brief); wxLogMessage(detailed); }