• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PlaceWindow函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PlaceWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ PlaceWindow函数的具体用法?C++ PlaceWindow怎么用?C++ PlaceWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PlaceWindow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: WXUNUSED

void EnvVarsConfigDlg::OnAddEnvVarClick(wxCommandEvent& WXUNUSED(event))
{
#if defined(TRACE_ENVVARS)
  Manager::Get()->GetLogManager()->DebugLog(F(_T("OnAddEnvVarClick")));
#endif

  wxCheckListBox* lstEnvVars = XRCCTRL(*this, "lstEnvVars", wxCheckListBox);
  if (!lstEnvVars)
    return;

  wxString key;
  wxString value;
  EditPairDlg dlg(this, key, value, _("Add new variable"),
    EditPairDlg::bmBrowseForDirectory);
  PlaceWindow(&dlg);
  if (dlg.ShowModal() == wxID_OK)
  {
    key.Trim(true).Trim(false);
    value.Trim(true).Trim(false);

    if (nsEnvVars::EnvvarVetoUI(key, NULL, -1))
      return;

    int  sel     = lstEnvVars->Append(key + _T(" = ") + value);
    bool success = nsEnvVars::EnvvarApply(key, value);
    if (sel>=0)
      lstEnvVars->Check(sel, success);
  }
}// OnAddEnvVarClick
开发者ID:Three-DS,项目名称:codeblocks-13.12,代码行数:29,代码来源:envvars_cfgdlg.cpp


示例2: wxGetCwd

bool cbDiffEditor::SaveAsUnifiedDiff()
{
    ConfigManager* mgr = Manager::Get()->GetConfigManager(_T("app"));
    wxString Path = wxGetCwd();
    wxString Filter;
    if(mgr && Path.IsEmpty())
        Path = mgr->Read(_T("/file_dialogs/save_file_as/directory"), Path);

    wxFileDialog dlg(Manager::Get()->GetAppWindow(), _("Save file"), Path, wxEmptyString, _("Diff files (*.diff)|*.diff"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
    PlaceWindow(&dlg);
    if (dlg.ShowModal() != wxID_OK)  // cancelled out
        return false;

    wxString Filename = dlg.GetPath();

    // store the last used directory
    if(mgr)
    {
        wxString Test = dlg.GetDirectory();
        mgr->Write(_T("/file_dialogs/save_file_as/directory"), dlg.GetDirectory());
    }

    if(!cbSaveToFile(Filename, diff_))
    {
        wxString msg;
        msg.Printf(_("File %s could not be saved..."), GetFilename().c_str());
        cbMessageBox(msg, _("Error saving file"), wxICON_ERROR);
        return false;
    }
    return true;
}
开发者ID:danselmi,项目名称:cbDiff,代码行数:31,代码来源:cbDiffEditor.cpp


示例3: dlg

void DisassemblyDlg::OnSave(cb_unused wxCommandEvent& event)
{
    wxFileDialog dlg(this,
                     _("Save as text file"),
                     _T("assembly_dump.txt"),
                     wxEmptyString,
                     FileFilters::GetFilterAll(),
                     wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
    PlaceWindow(&dlg);
    if (dlg.ShowModal() != wxID_OK)
        return;

    wxString output;
    cbProject* prj = Manager::Get()->GetProjectManager()->GetActiveProject();
    if (prj)
    {
        output << _("Project title : ") << prj->GetTitle() << _T('\n');
        output << _("Project path  : ") << prj->GetBasePath() << _T('\n') << _T('\n');
    }

    output << _("Frame function: ") << m_FrameFunction << _T('\n');
    output << _("Frame address : ") << m_FrameAddress << _T('\n');
    output << wxString(_T('-'), 80) << _T('\n');
    output << m_pCode->GetText();

    if (!cbSaveToFile(dlg.GetPath(), output))
        cbMessageBox(_("Could not save file..."), _("Error"), wxICON_ERROR);
}
开发者ID:alpha0010,项目名称:codeblocks_sf,代码行数:28,代码来源:disassemblydlg.cpp


示例4: ChooseDirectory

wxString ChooseDirectory(wxWindow* parent,
                         const wxString& message,
                         const wxString& initialPath,
                         const wxString& basePath,
                         bool askToMakeRelative, // relative to initialPath
                         bool showCreateDirButton) // where supported
{
    wxDirDialog dlg(parent, message, _T(""),
                    (showCreateDirButton ? wxDD_NEW_DIR_BUTTON : 0) | wxRESIZE_BORDER);
    dlg.SetPath(initialPath);
    PlaceWindow(&dlg);
    if (dlg.ShowModal() != wxID_OK)
        return wxEmptyString;

    wxFileName path(dlg.GetPath());
    if (askToMakeRelative && !basePath.IsEmpty())
    {
        // ask the user if he wants it to be kept as relative
        if (cbMessageBox(_("Keep this as a relative path?"),
                         _("Question"),
                         wxICON_QUESTION | wxYES_NO) == wxID_YES)
        {
            path.MakeRelativeTo(basePath);
        }
    }
    return path.GetFullPath();
}
开发者ID:stahta01,项目名称:codeblocks_https_metadata,代码行数:27,代码来源:globals.cpp


示例5: dlg

void ScriptingSettingsDlg::OnBrowse(wxCommandEvent& event)
{
    wxFileDialog dlg(this,
                     _("Select script file"),
                     XRCCTRL(*this, "txtScript", wxTextCtrl)->GetValue(),
                     XRCCTRL(*this, "txtScript", wxTextCtrl)->GetValue(),
                     FileFilters::GetFilterString(_T(".script")),
                     wxFD_OPEN | compatibility::wxHideReadonly );
    PlaceWindow(&dlg);
    if (dlg.ShowModal() == wxID_OK)
    {
        wxString sel = UnixFilename(dlg.GetPath());
        wxString userdir = UnixFilename(ConfigManager::GetFolder(sdScriptsUser));
        wxString globaldir = UnixFilename(ConfigManager::GetFolder(sdScriptsGlobal));
        wxFileName f(sel);
        if (sel.StartsWith(userdir))
        {
            f.MakeRelativeTo(userdir);
        }
        else if (sel.StartsWith(globaldir))
        {
            f.MakeRelativeTo(globaldir);
        }
        XRCCTRL(*this, "txtScript", wxTextCtrl)->SetValue(f.GetFullPath());
    }
}
开发者ID:469306621,项目名称:Languages,代码行数:26,代码来源:scriptingsettingsdlg.cpp


示例6: cbMessageBox

int cbMessageBox(const wxString& message, const wxString& caption, int style, wxWindow *parent, int x, int y)
{
    if (!parent)
        parent = Manager::Get()->GetAppWindow();

    // Cannot create a wxMessageDialog with a NULL as parent
    if (!parent)
    {
      // wxMessage*Box* returns any of: wxYES, wxNO, wxCANCEL, wxOK.
      int answer = wxMessageBox(message, caption, style, parent, x, y);
      switch (answer)
      {
        // map answer to the one of wxMessage*Dialog* to ensure compatibility
        case (wxOK):
          return wxID_OK;
        case (wxCANCEL):
          return wxID_CANCEL;
        case (wxYES):
          return wxID_YES;
        case (wxNO):
          return wxID_NO;
        default:
          return -1; // NOTE: Cannot happen unless wxWidgets API changes
      }
    }

    wxMessageDialog dlg(parent, message, caption, style, wxPoint(x,y));
    PlaceWindow(&dlg);
    // wxMessage*Dialog* returns any of wxID_OK, wxID_CANCEL, wxID_YES, wxID_NO
    return dlg.ShowModal();
}
开发者ID:stahta01,项目名称:codeblocks_https_metadata,代码行数:31,代码来源:globals.cpp


示例7: PlaceWindow

void DebuggerTree::OnAddWatch(wxCommandEvent& event)
{
    EditWatchDlg dlg;
    PlaceWindow(&dlg);
    if (dlg.ShowModal() == wxID_OK && !dlg.GetWatch().keyword.IsEmpty())
        AddWatch(dlg.GetWatch().keyword, dlg.GetWatch().format);
}
开发者ID:yjdwbj,项目名称:cb10-05-ide,代码行数:7,代码来源:debuggertree.cpp


示例8: dlg

void BacktraceDlg::OnSave(cb_unused wxCommandEvent& event)
{
    wxFileDialog dlg(this, _("Save as text file"), wxEmptyString, wxEmptyString,
                     FileFilters::GetFilterAll(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
    PlaceWindow(&dlg);
    if (dlg.ShowModal() != wxID_OK)
        return;

    wxFFileOutputStream output(dlg.GetPath());
    wxTextOutputStream text(output);

    for (int ii = 0; ii < m_list->GetItemCount(); ++ii)
    {
        wxListItem info;
        info.m_itemId = ii;
        info.m_col = 1;
        info.m_mask = wxLIST_MASK_TEXT;
        wxString addr = m_list->GetItem(info) && !info.m_text.IsEmpty() ? info.m_text : _T("??");
        info.m_col = 2;
        wxString func = m_list->GetItem(info) && !info.m_text.IsEmpty() ? info.m_text : _T("??");
        info.m_col = 3;
        wxString file = m_list->GetItem(info) && !info.m_text.IsEmpty() ? info.m_text : _T("??");
        info.m_col = 4;
        wxString line = m_list->GetItem(info) && !info.m_text.IsEmpty() ? info.m_text : _T("??");

        text << _T('#') << m_list->GetItemText(ii) << _T(' ')
            << addr << _T('\t')
            << func << _T(' ')
            << _T('(') << file << _T(':') << line << _T(')')
            << _T('\n');
    }
    cbMessageBox(_("File saved"), _("Result"), wxICON_INFORMATION);
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:33,代码来源:backtracedlg.cpp


示例9: PlaceWindow

void UserVariableManager::Configure()
{
    UsrGlblMgrEditDialog d;
    PlaceWindow(&d);
    d.ShowModal();
    m_ActiveSet = Manager::Get()->GetConfigManager(_T("gcv"))->Read(_T("/active"));
}
开发者ID:stahta01,项目名称:codeblocks_backup,代码行数:7,代码来源:uservarmanager.cpp


示例10: PlaceWindow

int AnnoyingDialog::ShowModal()
{
    if(m_DontAnnoy)
        return m_DefRet;
    PlaceWindow(this);
    return wxScrollingDialog::ShowModal();
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:7,代码来源:annoyingdialog.cpp


示例11: XRCCTRL

void CCOptionsDlg::OnEditRepl(cb_unused wxCommandEvent& event)
{
    wxString key;
    wxString value;

    int sel = XRCCTRL(*this, "lstRepl", wxListBox)->GetSelection();
    if (sel == -1)
        return;

    key = XRCCTRL(*this, "lstRepl", wxListBox)->GetStringSelection();
    value = key;

    key = key.BeforeFirst(_T(' '));
    value = value.AfterLast(_T(' '));

    EditPairDlg dlg(this, key, value, _("Edit replacement token"), EditPairDlg::bmDisable);
    PlaceWindow(&dlg);
    if (dlg.ShowModal() == wxID_OK)
    {
        if ( ValidateReplacementToken(key, value) )
        {
            Tokenizer::SetReplacementString(key, value);
            XRCCTRL(*this, "lstRepl", wxListBox)->SetString(sel, key + _T(" -> ") + value);
        }
    }
}
开发者ID:Distrotech,项目名称:codeblocks,代码行数:26,代码来源:ccoptionsdlg.cpp


示例12: dlg

void CodeBlocksApp::InitAssociations()
{
#ifdef __WXMSW__
    ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("app"));
    if (m_Assocs && cfg->ReadBool(_T("/environment/check_associations"), true))
    {
        if (!Associations::Check())
        {
            AskAssocDialog dlg(Manager::Get()->GetAppWindow());
            PlaceWindow(&dlg);

            switch(dlg.ShowModal())
            {
            case ASC_ASSOC_DLG_NO_DONT_ASK:
                cfg->Write(_T("/environment/check_associations"), false);
                break;
            case ASC_ASSOC_DLG_NO_ONLY_NOW:
                break;
            case ASC_ASSOC_DLG_YES_C_FILES:
                Associations::SetCore();
                break;
            case ASC_ASSOC_DLG_YES_ALL_FILES:
                Associations::SetAll();
                break;
            default:
                break;
            };
        }
    }
#endif
}
开发者ID:stahta01,项目名称:codeblocks_console,代码行数:31,代码来源:app.cpp


示例13: _T

void UserVariableManager::Arrogate()
{
    if (m_Preempted.GetCount() == 0)
        return;

    wxString peList;

    UsrGlblMgrEditDialog d;

    for (unsigned int i = 0; i < m_Preempted.GetCount(); ++i)
    {
        d.AddVar(m_Preempted[i]);
        peList << m_Preempted[i] << _T('\n');
    }
    peList = peList.BeforeLast('\n'); // remove trailing newline

    wxString msg;
    if (m_Preempted.GetCount() == 1)
        msg.Printf(_("In the currently active set, Code::Blocks does not know\n"
                     "the global compiler variable \"%s\".\n\n"
                     "Please define it."), peList.wx_str());
    else
        msg.Printf(_("In the currently active set, Code::Blocks does not know\n"
                     "the following global compiler variables:\n"
                     "%s\n\n"
                     "Please define them."), peList.wx_str());

    PlaceWindow(&d);
    m_Preempted.Clear();
    InfoWindow::Display(_("Global Compiler Variables"), msg , 8000 + 800*m_Preempted.GetCount(), 100);

    d.ShowModal();
}
开发者ID:stahta01,项目名称:codeblocks_backup,代码行数:33,代码来源:uservarmanager.cpp


示例14: dlg

void EnvironmentSettingsDlg::OnManageAssocs(wxCommandEvent& /*event*/)
{
#ifdef __WXMSW__
    ManageAssocsDialog dlg(this);
    PlaceWindow(&dlg);
    dlg.ShowModal();
#endif
}
开发者ID:stahta01,项目名称:EmBlocks,代码行数:8,代码来源:environmentsettingsdlg.cpp


示例15: path

wxString UserVariableManager::Replace(const wxString& variable)
{
    wxString package = variable.AfterLast(wxT('#')).BeforeFirst(wxT('.')).MakeLower();
    wxString member  = variable.AfterFirst(wxT('.')).MakeLower();

    wxString path(cSets + m_ActiveSet + _T('/') + package + _T('/'));

    wxString base = m_CfgMan->Read(path + cBase);

    if (base.IsEmpty())
    {
        if (Manager::Get()->GetProjectManager()->IsLoading())
        {
            // a project/workspace is being loaded.
            // no need to bug the user now about global vars.
            // just preempt it; ProjectManager will call Arrogate() when it's done.
            Preempt(variable);
            return variable;
        }
        else
        {
            wxString msg;
            msg.Printf(_("In the currently active set, Code::Blocks does not know\n"
                         "the global compiler variable \"%s\".\n\n"
                         "Please define it."), package.wx_str());
            InfoWindow::Display(_("Global Compiler Variables"), msg , 8000, 1000);
            UsrGlblMgrEditDialog d;
            d.AddVar(package);
            PlaceWindow(&d);
            d.ShowModal();
        }
    }

    if (member.IsEmpty() || member.IsSameAs(cBase))
        return base;

    if (member.IsSameAs(cInclude) || member.IsSameAs(cLib) || member.IsSameAs(cObj) || member.IsSameAs(cBin))
    {
        wxString ret = m_CfgMan->Read(path + member);
        if (ret.IsEmpty())
            ret = base + _T('/') + member;
        return ret;
    }

    const wxString wtf(wxT("#$%&???WTF???&%$#"));
    wxString ret = m_CfgMan->Read(path + member, wtf);
    if ( ret.IsSameAs(wtf) )
    {
        wxString msg;
        msg.Printf(_("In the currently active set, Code::Blocks does not know\n"
                     "the member \"%s\" of the global compiler variable \"%s\".\n\n"
                     "Please define it."), member.wx_str(), package.wx_str());
        InfoWindow::Display(_("Global Compiler Variables"), msg , 8000, 1000);
    }

    return ret;
}
开发者ID:stahta01,项目名称:codeblocks_backup,代码行数:57,代码来源:uservarmanager.cpp


示例16: PlaceWindow

void SpellCheckerPlugin::OnSpelling(cb_unused wxCommandEvent &event)
{
    cbEditor *ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
    if ( !ed ) return;
    cbStyledTextCtrl *stc = ed->GetControl();
    if ( !stc ) return;
    if ( m_pSpellingDialog )
        PlaceWindow(m_pSpellingDialog, pdlBest, true);
    stc->ReplaceSelection(m_pSpellChecker->CheckSpelling(stc->GetSelectedText()));
}
开发者ID:Three-DS,项目名称:codeblocks-13.12,代码行数:10,代码来源:SpellCheckerPlugin.cpp


示例17: _

// ----------------------------------------------------------------------------
// DoOnFileOpen:
// in case we are opening a project (bProject == true) we do not want to interfere
// with 'last type of files' (probably the call was open (existing) project on the
// start here page --> so we know it's a project --> set the filter accordingly
// but as said don't force the 'last used type of files' to change, that should
// only change when an open file is carried out (so (source) file <---> project (file) )
// TODO : when regular file open and user manually sets filter to project files --> will change
//      the last type : is that expected behaviour ???
// ----------------------------------------------------------------------------
void ThreadSearchFrame::DoOnFileOpen(bool bProject)
// ----------------------------------------------------------------------------
{
    wxString Filters = FileFilters::GetFilterString();
    // the value returned by GetIndexForFilterAll() is updated by GetFilterString()
    int StoredIndex = FileFilters::GetIndexForFilterAll();
    wxString Path;
    ConfigManager* mgr = Manager::Get()->GetConfigManager(_T("app"));
    if(mgr)
    {
        if(!bProject)
        {
            wxString Filter = mgr->Read(_T("/file_dialogs/file_new_open/filter"));
            if(!Filter.IsEmpty())
            {
                FileFilters::GetFilterIndexFromName(Filters, Filter, StoredIndex);
            }
            Path = mgr->Read(_T("/file_dialogs/file_new_open/directory"), Path);
        }
        else
        {
            FileFilters::GetFilterIndexFromName(Filters, _("Code::Blocks project files"), StoredIndex);
        }
    }
    wxFileDialog* dlg = new wxFileDialog(this,
                            _("Open file"),
                            Path,
                            wxEmptyString,
                            Filters,
                            wxFD_OPEN | wxFD_MULTIPLE | compatibility::wxHideReadonly);
    dlg->SetFilterIndex(StoredIndex);

    PlaceWindow(dlg);
    if (dlg->ShowModal() == wxID_OK)
    {
        // store the last used filter and directory
        // as said : don't do this in case of an 'open project'
        if(mgr && !bProject)
        {
            int Index = dlg->GetFilterIndex();
            wxString Filter;
            if(FileFilters::GetFilterNameFromIndex(Filters, Index, Filter))
            {
                mgr->Write(_T("/file_dialogs/file_new_open/filter"), Filter);
            }
            wxString Test = dlg->GetDirectory();
            mgr->Write(_T("/file_dialogs/file_new_open/directory"), dlg->GetDirectory());
        }
        wxArrayString files;
        dlg->GetPaths(files);
        OnDropFiles(0,0,files);
    }

    dlg->Destroy();
} // end of DoOnFileOpen
开发者ID:469306621,项目名称:Languages,代码行数:65,代码来源:ThreadSearchFrame.cpp


示例18: XRCCTRL

void ProjectOptionsDlg::OnEditDepsClick(wxCommandEvent& /*event*/)
{
    wxListBox* lstTargets = XRCCTRL(*this, "lstBuildTarget", wxListBox);
    ProjectBuildTarget* target = m_Project->GetBuildTarget(lstTargets->GetSelection());
    if (!target)
        return;

    ExternalDepsDlg dlg(this, m_Project, target);
    PlaceWindow(&dlg);
    dlg.ShowModal();
}
开发者ID:stahta01,项目名称:EmBlocks,代码行数:11,代码来源:projectoptionsdlg.cpp


示例19: dlg

int HeaderFixup::Configure()
{
  cbConfigurationDialog dlg(Manager::Get()->GetAppWindow(), wxID_ANY, _("Header Fixup Config"));
  cbConfigurationPanel* panel = GetConfigurationPanel(&dlg);
  if (panel)
  {
    dlg.AttachConfigurationPanel(panel);
    PlaceWindow(&dlg);
    return dlg.ShowModal() == wxID_OK ? 0 : -1;
  }
  return 1;
}// Configure
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:12,代码来源:headerfixup.cpp


示例20: d

void UsrGlblMgrEditDialog::NewVar(cb_unused wxCommandEvent& event)
{
    wxTextEntryDialog d(this, _("Please specify a name for the new variable:"), _("New Variable"));
    PlaceWindow(&d);
    if (d.ShowModal() == wxID_OK)
    {
        wxString name = d.GetValue();
        Save();
        Sanitise(name);
        AddVar(name);
    }
}
开发者ID:stahta01,项目名称:codeblocks_backup,代码行数:12,代码来源:uservarmanager.cpp



注:本文中的PlaceWindow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PlaneFromPoints函数代码示例发布时间:2022-05-30
下一篇:
C++ Pixel函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap