本文整理汇总了C++中MainFrame::Maximize方法的典型用法代码示例。如果您正苦于以下问题:C++ MainFrame::Maximize方法的具体用法?C++ MainFrame::Maximize怎么用?C++ MainFrame::Maximize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainFrame
的用法示例。
在下文中一共展示了MainFrame::Maximize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInit
bool OnInit()
{
//i18n/l10n:
//20120603: Change suggested by Juan Pizarro to solve the i18n bug in some Windows and Linux machines:
//if ( !locale.Init(wxLANGUAGE_DEFAULT, wxLOCALE_CONV_ENCODING) )
#if defined (linux)
wxLogNull logNo;
#endif
if ( !locale.Init(wxLANGUAGE_ENGLISH, wxLOCALE_CONV_ENCODING) )
wxLogWarning(_("Error #1: This language is not supported by the system."));
wxString lanPath(wxStandardPaths::Get().GetExecutablePath().BeforeLast(wxFileName::GetPathSeparator()) +
wxFileName::GetPathSeparator() + wxString("GUI") +
wxFileName::GetPathSeparator() + wxString("Texts") //##Unhardcode this in the future? I'm not sure...
);
wxLocale::AddCatalogLookupPathPrefix(lanPath);
wxString initialCatalogName("en.mo"); //This basic English catalog must exist.
//wxString initialCatalogName("es.mo"); //##Debug...
if (!locale.AddCatalog(initialCatalogName))
{
//##Future: See if future wxLocale implementations solve this problem:
wxLogWarning( _("Error #1: The installation path\n\n\"") + wxStandardPaths::Get().GetExecutablePath() +
_("\"\n\ncontains non-English chars.\n") +
_("Please try to install Minibloq on a location without this kind of chars. ") +
_("Otherwise, the program will run, but the translation system will not work properly.")
);
//wxLogWarning(_("Error #2: Can't load ") + initialCatalogName);
}
MainFrame* frame = NULL;
wxString caption = wxString("miniBloq v0.82.Beta");
wxPoint framePosition = wxDefaultPosition;
wxSize frameSize = wxDefaultSize;
long style = wxDEFAULT_FRAME_STYLE;
//Default values:
initialFrameX = 0;
initialFrameY = 0;
initialFrameHeight = 600;
initialFrameWidth = 800;
maximized = true;
centered = true;
strBoard = wxString("");
//Try to read the configuration file:
readConfig();
//Priorities:
// maximized has priority over all the other pos and size settings.
// centered has priority over x and y settings.
if (maximized)
style = style | wxMAXIMIZE;
if ( (initialFrameWidth > 0) && (initialFrameHeight > 0) )
{
framePosition = wxPoint(initialFrameX, initialFrameY);
frameSize = wxSize(initialFrameWidth, initialFrameHeight);
}
frame = new MainFrame( NULL,
wxID_ANY,
locale,
lanPath,
initialCatalogName,
caption,
strBoard,
framePosition,
frameSize,
style
);
/*## Future: Full screen:
wxFrame* frame = new MainFrame(NULL,
wxID_ANY,
wxString("Minibloq v1.0"),
wxDefaultPosition,
wxSize(1280, 800),
wxCLIP_CHILDREN);
*/
if (frame)
{
if (centered)
frame->Centre();
frame->setCentered(centered);
SetTopWindow(frame);
frame->Show();
if (maximized)
{
frame->Maximize();
}
if (argc > 0)
{
wxString fileName = argv[1];
if (wxFile::Exists(fileName))
{
frame->loadFileComponent(fileName);
}
}
}
return true;
}
示例2: OnInit
//.........这里部分代码省略.........
wxLogWarning( _("Error #1: The installation path\n\n\"") + wxStandardPaths::Get().GetExecutablePath() +
_("\"\n\ncontains non-English chars.\n") +
_("Please try to install Minibloq on a location without this kind of chars. ") +
_("Otherwise, the program will run, but the translation system will not work properly.")
);
//wxLogWarning(_("Error #2: Can't load ") + initialCatalogName);
printf("NO ENCUENTRO EL CATALOGO\n");
}
MainFrame* frame = NULL;
wxString caption = wxString(wxString("miniBloq ") + MINIBLOQ_VERSION);
wxPoint framePosition = wxDefaultPosition;
wxSize frameSize = wxDefaultSize;
long style = wxDEFAULT_FRAME_STYLE;
//Default values:
initialFrameX = 0;
initialFrameY = 0;
initialFrameHeight = 600;
initialFrameWidth = 800;
maximized = true;
centered = true;
strBoard = wxString("");
//Try to read the configuration file:
readConfig();
//Priorities:
// maximized has priority over all the other pos and size settings.
// centered has priority over x and y settings.
if (maximized)
style = style | wxMAXIMIZE;
if ( (initialFrameWidth > 0) && (initialFrameHeight > 0) )
{
framePosition = wxPoint(initialFrameX, initialFrameY);
frameSize = wxSize(initialFrameWidth, initialFrameHeight);
}
//TODO: Chequeo de errores
wxString execPath = wxStandardPaths::Get().GetExecutablePath().BeforeLast(wxFileName::GetPathSeparator());
wxString splashImg = execPath + "/../../GUI/Images/minibloqSplash.png";
wxBitmap splashPng;
splashPng.LoadFile(splashImg);
wxSplashScreen* splash = new wxSplashScreen(splashPng,
wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
3000,
NULL,
-1,
wxDefaultPosition,
wxDefaultSize,
wxBORDER_SIMPLE|wxSTAY_ON_TOP);
wxYield();
frame = new MainFrame( NULL,
wxID_ANY,
locale,
lanPath,
initialCatalogName,
caption,
strBoard,
framePosition,
frameSize,
style
);
/*## Future: Full screen:
wxFrame* frame = new MainFrame(NULL,
wxID_ANY,
wxString("Minibloq v1.0"),
wxDefaultPosition,
wxSize(1280, 800),
wxCLIP_CHILDREN);
*/
if (frame)
{
if (centered)
frame->Centre();
frame->setCentered(centered);
SetTopWindow(frame);
frame->Show();
if (maximized)
{
frame->Maximize();
}
if (argc > 0)
{
wxString fileName = argv[1];
if (wxFile::Exists(fileName))
{
frame->loadFileComponent(fileName);
}
}
}
return true;
}