本文整理汇总了C++中RestorePosition函数的典型用法代码示例。如果您正苦于以下问题:C++ RestorePosition函数的具体用法?C++ RestorePosition怎么用?C++ RestorePosition使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RestorePosition函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: memset
// для "этой темы" ищем её имя (от позиции курсора вверх/вниз по файлу)
const wchar_t *FindTopic(bool ForwardDirect, bool RestorePos)
{
const wchar_t *ret=NULL;
const wchar_t *tmp;
struct EditorInfo ei={sizeof(EditorInfo)};
Info.EditorControl(-1,ECTL_GETINFO,0,&ei);
memset(&esp,-1,sizeof(esp));
egs.StringNumber=-1;
intptr_t Direct=ForwardDirect?1:-1;
for (esp.CurLine=ei.CurLine; (ForwardDirect?esp.CurLine<ei.TotalLines:esp.CurLine>=0); esp.CurLine+=Direct)
{
Info.EditorControl(-1,ECTL_SETPOSITION,0,&esp);
Info.EditorControl(-1,ECTL_GETSTRING,0,&egs);
tmp=egs.StringText;
// "Тема": начинается '@', дальше букво-цифры, не содержит '='
if (lstrlen(tmp)>1 && *tmp==L'@' && *(tmp+1)!=L'-' && *(tmp+1)!=L'+' && !wcschr(tmp,L'='))
{
ret=tmp+1;
break;
}
}
if (RestorePos)
RestorePosition(&ei);
return ret;
}
示例2: DialogWithHelp
dlgSelectConnection::dlgSelectConnection(wxWindow *parent, frmMain *form) :
DialogWithHelp(form)
{
long style = wxCB_DROPDOWN;
remoteServer = NULL;
SetFont(settings->GetSystemFont());
LoadResource(parent, wxT("dlgSelectConnection"));
SetIcon(*connect_png_ico);
RestorePosition();
if (form != NULL)
style |= wxCB_READONLY;
cbServer = new ctlComboBoxFix(this, CTRLID_CBSERVER, ConvertDialogToPixels(wxPoint(65, 5)), ConvertDialogToPixels(wxSize(135, 12)), style);
cbDatabase = new wxComboBox(this, CTRLID_CBDATABASE, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 20)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
cbUsername = new wxComboBox(this, CTRLID_CBUSERNAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 35)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
cbRolename = new wxComboBox(this, CTRLID_CBROLENAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 50)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
if (form == NULL)
{
cbServer->SetValue(settings->Read(wxT("QuickConnect/server"), wxEmptyString));
cbDatabase->SetValue(settings->Read(wxT("QuickConnect/database"), wxEmptyString));
cbUsername->SetValue(settings->Read(wxT("QuickConnect/username"), wxEmptyString));
cbRolename->SetValue(settings->Read(wxT("QuickConnect/rolename"), wxEmptyString));
}
btnOK->Enable(cbServer->GetValue().Length() > 0 && cbDatabase->GetValue().Length() > 0 && cbUsername->GetValue().Length() > 0);
}
示例3: DialogWithHelp
dlgMainConfig::dlgMainConfig(pgFrame *parent, pgSettingItem *_item) :
DialogWithHelp((frmMain *)parent)
{
SetFont(settings->GetSystemFont());
LoadResource((wxWindow *)parent, wxT("dlgMainConfig"));
// Icon
SetIcon(*property_png_ico);
RestorePosition();
item = _item;
SetTitle(wxString::Format(_("Configuration setting \"%s\""), item->name.c_str()));
// Setup the default values
cbValue->Hide();
chkValue->Hide();
if (!item->newLine)
{
if (item->orgLine)
item->newLine = new pgConfigLine(item->orgLine);
else
{
item->newLine = new pgConfigLine();
item->newLine->item = item;
}
}
chkEnabled->SetValue(!item->newLine->isComment);
txtValue->SetValue(item->newLine->value);
txtComment->SetValue(item->newLine->comment);
wxFont fntLabel = stName->GetFont();
fntLabel.SetWeight(wxBOLD);
stName->SetFont(fntLabel);
stName->SetLabel(item->name);
wxString str;
str += _("Category") + wxString(wxT(": ")) + item->category + END_OF_LINE;
str += _("Context") + wxString(wxT(": "));
str += wxGetTranslation(contextStrings[item->context]);
str += END_OF_LINE;
if (item->source != pgSettingItem::PGC_UNKNOWNSOURCE)
{
str += _("Current value") + wxString(wxT(": "));
if (item->value == wxT("unset") && item->source == pgSettingItem::PGC_DEFAULT)
str += _("unset");
else
str += item->value + END_OF_LINE wxT(" ") + wxGetTranslation(sourceStrings[item->source]);
str += END_OF_LINE;
}
stDescription->SetLabel(str + END_OF_LINE + item->short_desc + END_OF_LINE + item->extra_desc);
btnOK->Enable();
}
示例4: TRectF
void __fastcall TFormMain::FormVirtualKeyboardHidden(TObject *Sender, bool KeyboardVisible,
const TRect &Bounds)
{
FKBBounds = TRectF(0, 0, 0, 0);
FNeedOffset = false;
RestorePosition();
}
示例5: wxCHECK_RET
void
wxMFrame::Create(const String &framename, wxWindow *parent)
{
wxCHECK_RET( !m_initialised, _T("wxMFrame created twice") );
SetName(framename);
int xpos, ypos, width, height;
bool startIconised, startMaximised;
RestorePosition(MFrameBase::GetName(), &xpos, &ypos, &width, &height,
&startIconised, &startMaximised);
// use name as default title
if ( !wxFrame::Create(parent, -1, framename,
wxPoint(xpos, ypos), wxSize(width,height)) )
{
wxFAIL_MSG( _T("Failed to create a frame!") );
return;
}
SetIcon(ICON(_T("MFrame")));
// no "else": a frame can be maximized and iconized, meaning that it will
// become maximized when restored
if ( startMaximised )
Maximize();
if ( startIconised )
Iconize();
m_initialised = true;
SetMenuBar(new wxMenuBar(wxMB_DOCKABLE));
}
示例6: ExecutionDialog
frmMaintenance::frmMaintenance(frmMain *form, pgObject *obj) : ExecutionDialog(form, obj)
{
wxWindowBase::SetFont(settings->GetSystemFont());
LoadResource(form, wxT("frmMaintenance"));
RestorePosition();
SetTitle(object->GetTranslatedMessage(MAINTENANCEDIALOGTITLE));
txtMessages = CTRL_TEXT("txtMessages");
// Icon
SetIcon(*vacuum_png_ico);
// Note that under GTK+, SetMaxLength() function may only be used with single line text controls.
// (see http://docs.wxwidgets.org/2.8/wx_wxtextctrl.html#wxtextctrlsetmaxlength)
#ifndef __WXGTK__
txtMessages->SetMaxLength(0L);
#endif
if (object->GetMetaType() == PGM_INDEX || object->GetMetaType() == PGM_PRIMARYKEY || object->GetMetaType() == PGM_UNIQUE)
{
rbxAction->SetSelection(2);
rbxAction->Enable(0, false);
rbxAction->Enable(1, false);
}
wxCommandEvent ev;
OnAction(ev);
}
示例7: Create
BOOL CTextInfoForm::DoCreateDialog(CWnd* parent)
{
BOOL ret = Create(IDD, parent);
if (!ret) return FALSE;
// prepare titlebar
title.ModifyStyle(0, WS_CLIPCHILDREN);
title.ModifyStyleEx(0, WS_EX_CONTROLPARENT);
CRect rc;
rc.SetRect(0, 0, 60, 23);
btn_copy.Create(_T("&Copy"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP, rc, &title, IDC_BUTTON_COPYTEXT);
btn_copy.SetWindowPos(NULL, 4, 4, rc.Width(), rc.Height(), SWP_SHOWWINDOW | SWP_NOZORDER);
btn_copy.SetFont(GetFont());
btn_save.Create(_T("&Save"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP, rc, &title, IDC_BUTTON_SAVE);
btn_save.SetWindowPos(NULL, 8 + rc.Width(), 4, rc.Width(), rc.Height(), SWP_SHOWWINDOW | SWP_NOZORDER);
btn_save.SetFont(GetFont());
rc.SetRect(0, 0, 150, 23);
combo_reporttype.Create(WS_TABSTOP | WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST, rc, &title, IDC_COMBO_REPORTTYPE);
combo_reporttype.SetFont(GetFont());
// Force a second resize to give the combo box a chance to position itself once it's fully created
// Would not be an issue if the setup above was done in OnInitDialog...
SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE); // resize down to zero
SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOZORDER); // resize down to zero
RestorePosition(); // then restore position or set default position
OnInitialize();
return TRUE;
};
示例8: ASSERT
void CGraphStudioModelessDialog::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
ASSERT(view);
if (bShow)
RestorePosition();
}
示例9: SetFont
frmPassword::frmPassword(wxFrame *parent, pgObject *obj)
{
SetFont(settings->GetSystemFont());
LoadResource(parent, wxT("frmPassword"));
RestorePosition();
server = obj->GetServer();
// Icon
SetIcon(*connect_png_ico);
}
示例10: DialogWithHelp
frmHint::frmHint(wxWindow *fr, bool _force) : DialogWithHelp(0)
{
force = _force;
wxWindowBase::SetFont(settings->GetSystemFont());
LoadResource(fr, wxT("frmHint"));
RestorePosition();
if (force)
btnCancel->Disable();
SetIcon(*hint_png_ico);
}
示例11: SetFont
ddPrecisionScaleDialog::ddPrecisionScaleDialog( wxWindow *parent,
const wxString &defaultValue1,
const wxString &defaultValue2
)
{
SetFont(settings->GetSystemFont());
LoadResource(parent, wxT("ddPrecisionScaleDialog"));
RestorePosition();
Init();
SetValue1(defaultValue1);
SetValue2(defaultValue2);
txtPrecision->SetFocus();
}
示例12: SavePosition
bool StringList::GetString(char *Str,wchar *StrW,int MaxLength,int StringNum)
{
SavePosition();
Rewind();
bool RetCode=true;
while (StringNum-- >=0)
if (!GetString(Str,StrW,MaxLength))
{
RetCode=false;
break;
}
RestorePosition();
return(RetCode);
}
示例13: m_connProp
dlgDirectDbg::dlgDirectDbg( frmDebugger *parent, wxWindowID id, const dbgConnProp &connProp )
: m_connProp(connProp),
m_targetInfo(NULL),
m_conn(NULL),
m_codeWindow(NULL),
m_parent (parent),
m_cancelled (false)
{
wxWindowBase::SetFont(settings->GetSystemFont());
LoadResource(m_parent, wxT("dlgDirectDbg"));
// Icon
SetIcon(*debugger_png_ico);
RestorePosition();
}
示例14: pgFrame
frmDebugger::frmDebugger(frmMain *_parent, dbgController *_controller,
const wxString &_title) : pgFrame(_parent, _title), m_menuBar(NULL),
m_toolBar(NULL), m_viewMenu(NULL), m_debugMenu(NULL), m_statusBar(NULL),
m_parent(_parent), m_controller(_controller), m_stackWindow(NULL),
m_tabWindow(NULL), m_codeViewer(NULL)
{
dlgName = wxT("frmDebugger");
RestorePosition(100, 100, 600, 500, 450, 300);
SetFont(settings->GetSystemFont());
m_manager.SetManagedWindow(this);
m_manager.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_TRANSPARENT_DRAG);
// Define the icon for this window
SetIcon(*debugger_png_ico);
// Create (and configure) the menu bar, toolbar, and status bar
m_menuBar = SetupMenuBar();
m_toolBar = SetupToolBar();
m_statusBar = SetupStatusBar();
m_manager.AddPane(
m_toolBar,
wxAuiPaneInfo().Name(wxT("toolBar")).Caption(wxT("Toolbar"))
.ToolbarPane().Top().Row(1).Position(1).LeftDockable(false)
.RightDockable(false));
// Now load the layout
wxString perspective;
settings->Read(
wxT("Debugger/frmDebugger/Perspective-")
+ wxString(FRMDEBUGGER_PERSPECTIVE_VER),
&perspective, FRMDEBUGGER_DEFAULT_PERSPECTIVE);
m_manager.LoadPerspective(perspective, true);
// and reset the captions for the current language
m_manager.GetPane(wxT("toolBar")).Caption(_("Toolbar"));
// Sync the View menu options
m_viewMenu->Check(MENU_ID_VIEW_TOOLBAR, m_manager.GetPane(wxT("toolBar")).IsShown());
SetupDebugger();
m_manager.Update();
}
示例15: DialogWithHelp
dlgConnect::dlgConnect(frmMain *form, const wxString &description, bool storePwd) :
DialogWithHelp(form)
{
SetFont(settings->GetSystemFont());
LoadResource((wxWindow *)form, wxT("dlgConnect"));
SetIcon(*connect_png_ico);
RestorePosition();
// Setup the default values
stDescription->SetLabel(description);
chkStorePwd->SetValue(storePwd);
txtPassword->Enable(true);
if (form == NULL)
chkStorePwd->Hide();
}