本文整理汇总了C++中Workspace::SetSavedPath方法的典型用法代码示例。如果您正苦于以下问题:C++ Workspace::SetSavedPath方法的具体用法?C++ Workspace::SetSavedPath怎么用?C++ Workspace::SetSavedPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Workspace
的用法示例。
在下文中一共展示了Workspace::SetSavedPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fileHandling
MainFrame::MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties, wxString openPath)
: MainFrameBase(parent)
{
m_locale = locale;
m_generalProperties = initProperties;
Init();
if(openPath != "") {
EnableCurrentProjectRibbon();
Workspace* newWorkspace = new Workspace(this, _("Open project"), this->GetStatusBar(), m_sharedGLContext);
if(!m_sharedGLContext) m_sharedGLContext = newWorkspace->GetOpenGLContext();
FileHanding fileHandling(newWorkspace);
if(fileHandling.OpenProject(openPath)) {
newWorkspace->SetSavedPath(openPath);
m_workspaceList.push_back(newWorkspace);
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true);
m_auiNotebook->Layout();
newWorkspace->Redraw();
newWorkspace->SetJustOpened(true);
newWorkspace->Fit();
m_projectNumber++;
}
}
}
示例2: OnOpenClick
void MainFrame::OnOpenClick(wxRibbonButtonBarEvent& event)
{
wxFileDialog openFileDialog(this, _("Open PSP file"), "", "", "PSP files (*.psp)|*.psp",
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if(openFileDialog.ShowModal() == wxID_CANCEL) return;
wxFileName fileName(openFileDialog.GetPath());
EnableCurrentProjectRibbon();
Workspace* newWorkspace = new Workspace(this, _("Open project"), this->GetStatusBar(), m_sharedGLContext);
if(!m_sharedGLContext) m_sharedGLContext = newWorkspace->GetOpenGLContext();
FileHanding fileHandling(newWorkspace);
if(fileHandling.OpenProject(fileName)) {
newWorkspace->SetSavedPath(fileName);
m_workspaceList.push_back(newWorkspace);
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true);
m_auiNotebook->Layout();
newWorkspace->Redraw();
newWorkspace->SetJustOpened(true);
newWorkspace->Fit();
m_projectNumber++;
} else {
wxMessageDialog msgDialog(this, _("It was not possible to open the selected file."), _("Error"),
wxOK | wxCENTRE | wxICON_ERROR);
msgDialog.ShowModal();
delete newWorkspace;
}
}
示例3: OnSaveAsClick
void MainFrame::OnSaveAsClick(wxRibbonButtonBarEvent& event)
{
Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
if(workspace) {
FileHanding fileHandling(workspace);
wxFileDialog saveFileDialog(this, _("Save PSP file"), "", "", "PSP files (*.psp)|*.psp",
wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if(saveFileDialog.ShowModal() == wxID_CANCEL) return;
fileHandling.SaveProject(saveFileDialog.GetPath());
wxFileName fileName(saveFileDialog.GetPath());
workspace->SetName(fileName.GetName());
m_auiNotebook->SetPageText(m_auiNotebook->GetPageIndex(workspace), workspace->GetName());
workspace->SetSavedPath(fileName);
}
}