本文整理汇总了C++中LoadDialog函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadDialog函数的具体用法?C++ LoadDialog怎么用?C++ LoadDialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LoadDialog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dlgWayPointSelect
const Waypoint*
dlgWayPointSelect(SingleWindow &parent, const GeoPoint &location)
{
wf = LoadDialog(CallBackTable, parent, Layout::landscape ?
_T("IDR_XML_WAYPOINTSELECT_L") : _T("IDR_XML_WAYPOINTSELECT"));
if (!wf)
return NULL;
assert(wf != NULL);
wf->SetKeyDownNotify(FormKeyDown);
((WndButton *)wf->FindByName(_T("cmdClose")))->
SetOnClickNotify(OnWPSCloseClicked);
((WndButton *)wf->FindByName(_T("cmdSelect")))->
SetOnClickNotify(OnWPSSelectClicked);
((WndButton *)wf->FindByName(_T("cmdFltName")))->
SetOnClickNotify(OnFilterNameButton);
wWayPointList = (WndListFrame*)wf->FindByName(_T("frmWayPointList"));
assert(wWayPointList != NULL);
wWayPointList->SetActivateCallback(OnWaypointListEnter);
wWayPointList->SetPaintItemCallback(OnPaintListItem);
wbName = (WndButton*)wf->FindByName(_T("cmdFltName"));
wpDistance = (WndProperty*)wf->FindByName(_T("prpFltDistance"));
wpDirection = (WndProperty*)wf->FindByName(_T("prpFltDirection"));
wpType = (WndProperty *)wf->FindByName(_T("prpFltType"));
g_location = location;
PrepareData();
UpdateList();
wf->SetTimerNotify(OnTimerNotify);
if (wf->ShowModal() != mrOK) {
delete wf;
return NULL;
}
unsigned ItemIndex = wWayPointList->GetCursorIndex();
if (ItemIndex >= WayPointSelectInfo.size())
return NULL;
delete wf;
return WayPointSelectInfo[ItemIndex].way_point;
}
开发者ID:hnpilot,项目名称:XCSoar,代码行数:50,代码来源:dlgWayPointSelect.cpp
示例2: dlgBrightnessShowModal
void dlgBrightnessShowModal(){
wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
_T("IDR_XML_BRIGHTNESS"));
if (wf == NULL)
return;
LoadFormProperty(*wf, _T("prpBrightness"), BrightnessValue);
LoadFormProperty(*wf, _T("prpAuto"), EnableAutoBrightness);
wf->ShowModal();
UpdateValues();
delete wf;
}
开发者ID:damianob,项目名称:xcsoar,代码行数:15,代码来源:dlgBrightness.cpp
示例3: dlgTeamCodeShowModal
void
dlgTeamCodeShowModal(void)
{
WndProperty* wp = NULL;
WndButton *buttonCode = NULL;
if (Layout::landscape)
wf = LoadDialog(CallBackTable,
XCSoarInterface::main_window, _T("IDR_XML_TEAMCODE_L"));
else
wf = LoadDialog(CallBackTable,
XCSoarInterface::main_window, _T("IDR_XML_TEAMCODE"));
if (!wf)
return;
// set event for button
buttonCode = ((WndButton *)wf->FindByName(_T("cmdSetCode")));
if (buttonCode) {
buttonCode->SetOnClickNotify(OnCodeClicked);
}
// Set unit for range
wp = (WndProperty*)wf->FindByName(_T("prpRange"));
if (wp) {
wp->GetDataField()->SetUnits(Units::GetDistanceName());
}
Update();
wf->SetTimerNotify(OnTimerNotify);
wf->ShowModal();
delete wf;
}
开发者ID:hnpilot,项目名称:XCSoar,代码行数:36,代码来源:dlgTeamCode.cpp
示例4: dlgNOAADetailsShowModal
void
dlgNOAADetailsShowModal(SingleWindow &parent, NOAAStore::iterator iterator)
{
station_iterator = iterator;
wf = LoadDialog(CallBackTable, parent, Layout::landscape ?
_T("IDR_XML_NOAA_DETAILS_L") : _T("IDR_XML_NOAA_DETAILS"));
assert(wf != NULL);
Update();
wf->ShowModal();
delete wf;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:15,代码来源:dlgNOAADetails.cpp
示例5: dlgSwitchesShowModal
void
dlgSwitchesShowModal(void)
{
wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
_T("IDR_XML_SWITCHES"));
if (wf == NULL)
return;
wf->SetTimerNotify(OnTimerNotify);
UpdateValues();
wf->ShowModal();
delete wf;
}
开发者ID:galippi,项目名称:xcsoar,代码行数:15,代码来源:dlgSwitches.cpp
示例6: dlgHelpShowModal
void
dlgHelpShowModal(SingleWindow &parent,
const TCHAR* Caption, const TCHAR* HelpText)
{
if (!Caption || !HelpText) {
return;
}
if (!Layout::landscape) {
wf = LoadDialog(CallBackTable,
parent,
_T("IDR_XML_HELP_L"));
} else {
wf = LoadDialog(CallBackTable,
parent,
_T("IDR_XML_HELP"));
}
if (wf == NULL)
return;
WndProperty* wp;
TCHAR fullcaption[100];
_stprintf(fullcaption,_T("Help: %s"), Caption);
wf->SetCaption(fullcaption);
wp = (WndProperty*)wf->FindByName(_T("prpHelpText"));
if (wp) {
wp->SetText(HelpText);
wp->RefreshDisplay();
}
wf->ShowModal();
delete wf;
}
开发者ID:Plantain,项目名称:XCSoar,代码行数:36,代码来源:dlgHelp.cpp
示例7: dlgStartupShowModal
bool
dlgStartupShowModal()
{
LogStartUp(_T("Startup dialog"));
logo = new LogoView();
wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
Layout::landscape ? _T("IDR_XML_STARTUP_L") :
_T("IDR_XML_STARTUP"));
assert(wf != NULL);
WndProperty* wp = ((WndProperty *)wf->FindByName(_T("prpProfile")));
assert(wp != NULL);
DataFieldFileReader* dfe = (DataFieldFileReader*)wp->GetDataField();
assert(dfe != NULL);
((WndButton *)wf->FindByName(_T("cmdClose")))
->SetOnClickNotify(OnCloseClicked);
((WndButton *)wf->FindByName(_T("cmdQuit")))->SetOnClickNotify(OnQuit);
dfe->SetNotNullable();
dfe->ScanDirectoryTop(_T("*.prf"));
dfe->Lookup(Profile::GetPath());
wp->RefreshDisplay();
if (dfe->GetNumFiles() <= 1) {
SelectProfile(dfe->GetPathFile());
delete wf;
delete logo;
return true;
}
if (wf->ShowModal() != mrOK) {
delete wf;
delete logo;
return false;
}
SelectProfile(dfe->GetPathFile());
delete wf;
delete logo;
return true;
}
开发者ID:macsux,项目名称:XCSoar,代码行数:48,代码来源:dlgStartup.cpp
示例8: dlgStartupShowModal
bool
dlgStartupShowModal()
{
LogStartUp(_T("Startup dialog"));
wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
Layout::landscape ? _T("IDR_XML_STARTUP_L") :
_T("IDR_XML_STARTUP"));
assert(wf != NULL);
WndProperty* wp = ((WndProperty *)wf->FindByName(_T("prpProfile")));
assert(wp != NULL);
DataFieldFileReader* dfe = (DataFieldFileReader*)wp->GetDataField();
assert(dfe != NULL);
((WndButton *)wf->FindByName(_T("cmdClose")))
->SetOnClickNotify(OnCloseClicked);
((WndButton *)wf->FindByName(_T("cmdQuit")))->SetOnClickNotify(OnQuit);
dfe->ScanDirectoryTop(is_altair() ? _T("config/*.prf") : _T("*.prf"));
dfe->Lookup(startProfileFile);
wp->RefreshDisplay();
if (dfe->GetNumFiles() <= 2) {
delete wf;
return true;
}
if (wf->ShowModal() != mrOK) {
delete wf;
return false;
}
const TCHAR *path = dfe->GetPathFile();
if (!string_is_empty(path)) {
_tcscpy(startProfileFile, path);
/* When a profile from a secondary data path is used, this path
becomes the primary data path */
TCHAR temp[MAX_PATH];
SetPrimaryDataPath(DirName(path, temp));
}
delete wf;
return true;
}
开发者ID:galippi,项目名称:xcsoar,代码行数:48,代码来源:dlgStartup.cpp
示例9: switch
void CompositeDlg::VScroll(int code, short int cpos ) {
switch (code) {
case SB_LINEUP: theTex->offset--; break;
case SB_LINEDOWN: theTex->offset++; break;
case SB_PAGEUP: theTex->offset -= NDLG; break;
case SB_PAGEDOWN: theTex->offset += NDLG; break;
case SB_THUMBPOSITION:
case SB_THUMBTRACK:
theTex->offset = cpos;
break;
}
theTex->ClampOffset();
UpdateSubTexNames();
LoadDialog(ip->GetTime());
}
开发者ID:2asoft,项目名称:xray,代码行数:16,代码来源:composit.cpp
示例10: dlgTargetShowModal
void
dlgTargetShowModal(int _target_point)
{
if (protected_task_manager == nullptr)
return;
wf = LoadDialog(callback_table, UIGlobals::GetMainWindow(),
Layout::landscape ? _T("IDR_XML_TARGET_L") :
_T("IDR_XML_TARGET"));
assert(wf != nullptr);
SetDataAccessCallback(*wf, _T("prpRange"), OnRangeData);
SetDataAccessCallback(*wf, _T("prpRadial"), OnRadialData);
if (!InitTargetPoints(_target_point)) {
delete wf;
map = nullptr;
return;
}
optimized_checkbox = (CheckBoxControl*)wf->FindByName(_T("chkbOptimized"));
assert(optimized_checkbox != nullptr);
UpdateButtons();
wf->SetKeyDownFunction(FormKeyDown);
struct TargetDialogUpdateListener : public NullBlackboardListener {
virtual void OnCalculatedUpdate(const MoreData &basic,
const DerivedInfo &calculated) {
map->Invalidate();
RefreshCalculator();
}
};
TargetDialogUpdateListener blackboard_listener;
RateLimitedBlackboardListener rate_limited_bl(blackboard_listener,
1800, 300);
//WindowBlackboardListener
CommonInterface::GetLiveBlackboard().AddListener(rate_limited_bl);
wf->ShowModal();
delete wf;
CommonInterface::GetLiveBlackboard().RemoveListener(rate_limited_bl);
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:47,代码来源:TargetDialog.cpp
示例11: dlgSimulatorPromptShowModal
SimulatorPromptResult
dlgSimulatorPromptShowModal()
{
#ifdef SIMULATOR_AVAILABLE
int result;
logo = new LogoView();
do {
wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
Layout::landscape ? _T("IDR_XML_SIMULATORPROMPT_L") :
_T("IDR_XML_SIMULATORPROMPT"));
assert(wf != NULL);
WndButton* wb;
wb = ((WndButton *)wf->FindByName(_T("cmdSimulator")));
assert(wb != NULL);
wb->SetOnClickNotify(OnSimulatorClicked);
wb = ((WndButton *)wf->FindByName(_T("cmdFly")));
assert(wb != NULL);
wb->SetOnClickNotify(OnFlyClicked);
wb = ((WndButton *)wf->FindByName(_T("cmdQuit")));
assert(wb != NULL);
wb->SetOnClickNotify(OnQuitClicked);
result = wf->ShowModal();
delete wf;
} while (result == mrChangeLayout);
delete logo;
switch (result) {
case mrFly:
return SPR_FLY;
case mrSimulator:
return SPR_SIMULATOR;
default:
return SPR_QUIT;
}
#else
return SPR_FLY;
#endif
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:46,代码来源:dlgSimulatorPrompt.cpp
示例12: dlgFlarmTrafficShowModal
/**
* The function opens the FLARM Traffic dialog
*/
void
dlgFlarmTrafficShowModal()
{
// Load dialog from XML
wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
Layout::landscape ? _T("IDR_XML_FLARMTRAFFIC_L") :
_T("IDR_XML_FLARMTRAFFIC"));
if (!wf)
return;
// Set dialog events
wf->SetKeyDownNotify(FormKeyDown);
wf->SetTimerNotify(OnTimerNotify);
// Set button events
((WndButton *)wf->FindByName(_T("cmdDetails")))->
SetOnClickNotify(OnDetailsClicked);
((WndButton *)wf->FindByName(_T("cmdZoomIn")))->
SetOnClickNotify(OnZoomInClicked);
((WndButton *)wf->FindByName(_T("cmdZoomOut")))->
SetOnClickNotify(OnZoomOutClicked);
((WndButton *)wf->FindByName(_T("cmdPrev")))->
SetOnClickNotify(OnPrevClicked);
((WndButton *)wf->FindByName(_T("cmdNext")))->
SetOnClickNotify(OnNextClicked);
((WndButton *)wf->FindByName(_T("cmdClose")))->
SetOnClickNotify(OnCloseClicked);
((WndButton *)wf->FindByName(_T("cmdSwitchData")))->
SetOnClickNotify(OnSwitchDataClicked);
// Update Radar and Selection for the first time
Update();
// Get the last chosen Side Data configuration
auto_zoom = (CheckBox *)wf->FindByName(_T("AutoZoom"));
auto_zoom->set_checked(wdf->GetAutoZoom());
north_up = (CheckBox *)wf->FindByName(_T("NorthUp"));
north_up->set_checked(wdf->GetNorthUp());
// Show the dialog
wf->ShowModal();
// After dialog closed -> delete it
delete wf;
}
开发者ID:galippi,项目名称:xcsoar,代码行数:49,代码来源:dlgFlarmTraffic.cpp
示例13: dlgFlarmTrafficDetailsShowModal
/**
* The function opens the FLARM Traffic Details dialog
*/
void
dlgFlarmTrafficDetailsShowModal(FlarmId id)
{
if (wf)
return;
target_id = id;
// Load dialog from XML
wf = LoadDialog(CallBackTable,
XCSoarInterface::main_window, Layout::landscape ?
_T("IDR_XML_FLARMTRAFFICDETAILS_L") : _T("IDR_XML_FLARMTRAFFICDETAILS"));
if (!wf)
return;
// Set dialog events
wf->SetTimerNotify(OnTimerNotify);
((WndButton *)wf->FindByName(_T("cmdClose")))->
SetOnClickNotify(OnCloseClicked);
((WndButton *)wf->FindByName(_T("cmdSetAsTeamMate")))->
SetOnClickNotify(OnTeamClicked);
((WndButton *)wf->FindByName(_T("cmdCallsign")))->
SetOnClickNotify(OnCallsignClicked);
((WndSymbolButton*)wf->FindByName(_T("cmdFriendGreen")))->
SetOnClickNotify(OnFriendGreenClicked);
((WndSymbolButton*)wf->FindByName(_T("cmdFriendBlue")))->
SetOnClickNotify(OnFriendBlueClicked);
((WndSymbolButton*)wf->FindByName(_T("cmdFriendYellow")))->
SetOnClickNotify(OnFriendYellowClicked);
((WndSymbolButton*)wf->FindByName(_T("cmdFriendMagenta")))->
SetOnClickNotify(OnFriendMagentaClicked);
((WndButton*)wf->FindByName(_T("cmdFriendClear")))->
SetOnClickNotify(OnFriendClearClicked);
// Update fields for the first time
Update();
// Show the dialog
wf->ShowModal();
// After dialog closed -> delete it
delete wf;
wf = NULL;
}
开发者ID:macsux,项目名称:XCSoar,代码行数:49,代码来源:dlgFlarmTrafficDetails.cpp
示例14: dlgAirspaceDetails
void
dlgAirspaceDetails(const AbstractAirspace& the_airspace)
{
airspace = &the_airspace;
wf = LoadDialog(CallBackTable,
XCSoarInterface::main_window,
_T("IDR_XML_AIRSPACEDETAILS"));
if (!wf) return;
SetValues();
wf->ShowModal();
delete wf;
wf = NULL;
}
开发者ID:Plantain,项目名称:XCSoar,代码行数:17,代码来源:dlgAirspaceDetails.cpp
示例15: dlgConfigFontsShowModal
void dlgConfigFontsShowModal()
{
wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
Layout::landscape ?
_T("IDR_XML_CONFIG_FONTS_L") : _T("IDR_XML_CONFIG_FONTS"));
if (wf == NULL)
return;
((WndButton *)wf->FindByName(_T("cmdClose")))->SetOnClickNotify(OnCloseClicked);
UISettings &ui_settings = CommonInterface::SetUISettings();
LoadFormProperty(*wf, _T("prpUseCustomFonts"), ui_settings.custom_fonts);
ShowFontEditButtons(ui_settings.custom_fonts);
RefreshFonts();
FontRegistryChanged = false;
changed = false;
wf->ShowModal();
changed |= SaveFormProperty(*wf, _T("prpUseCustomFonts"),
szProfileUseCustomFonts,
ui_settings.custom_fonts);
TempInfoWindowFont.reset();
TempTitleWindowFont.reset();
TempMapWindowFont.reset();
TempTitleSmallWindowFont.reset();
TempMapWindowBoldFont.reset();
TempCDIWindowFont.reset();
TempMapLabelFont.reset();
TempMapLabelImportantFont.reset();
if (changed) {
Profile::Save();
MessageBoxX(_("Changes to configuration saved. Restart XCSoar to apply changes."),
_T(""), MB_OK);
}
delete wf;
}
开发者ID:macsux,项目名称:XCSoar,代码行数:45,代码来源:dlgConfigFonts.cpp
示例16: dlgTeamCodeShowModal
void
dlgTeamCodeShowModal()
{
wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
Layout::landscape ? _T("IDR_XML_TEAMCODE_L") :
_T("IDR_XML_TEAMCODE"));
if (!wf)
return;
Update(CommonInterface::Basic(), CommonInterface::Calculated());
const ScopeCalculatedListener l(CommonInterface::GetLiveBlackboard(),
Update);
wf->ShowModal();
delete wf;
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:19,代码来源:TeamCodeDialog.cpp
示例17: dlgCreditsShowModal
void
dlgCreditsShowModal(SingleWindow &parent)
{
wf = LoadDialog(CallBackTable, parent, Layout::landscape ?
_T("IDR_XML_CREDITS_L") : _T("IDR_XML_CREDITS"));
assert(wf != NULL);
tab = ((TabbedControl *)wf->FindByName(_T("tab")));
assert(tab != NULL);
wf->SetKeyDownNotify(FormKeyDown);
LoadTextFromResource(_T("LICENSE"), _T("prpLicense"));
LoadTextFromResource(_T("AUTHORS"), _T("prpAuthors"));
wf->ShowModal();
delete wf;
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:19,代码来源:dlgCredits.cpp
示例18: dlgTaskPointShowModal
bool
dlgTaskPointShowModal(SingleWindow &parent, OrderedTask** task,
const unsigned index)
{
ordered_task = *task;
task_modified = false;
active_index = index;
wf = LoadDialog(CallBackTable, parent,
Layout::landscape ? _T("IDR_XML_TASKPOINT_L") :
_T("IDR_XML_TASKPOINT"));
assert(wf != NULL);
wTaskView = (WndFrame*)wf->FindByName(_T("frmTaskView"));
assert(wTaskView != NULL);
WndFrame* wType = (WndFrame*) wf->FindByName(_T("lblType"));
assert (wType);
wType->SetFont(Fonts::MapBold);
WndFrame* wLocation = (WndFrame*) wf->FindByName(_T("lblLocation"));
assert (wLocation);
wLocation->SetFont(Fonts::MapBold);
do {
RefreshView();
next_previous=0;
if (wf->ShowModal() == mrOK)
ReadValues();
active_index += next_previous;
} while (next_previous != 0);
delete wf;
if (*task != ordered_task) {
*task = ordered_task;
task_modified = true;
}
if (task_modified) {
ordered_task->update_geometry();
}
return task_modified;
}
开发者ID:joachimwieland,项目名称:xcsoar-jwieland,代码行数:43,代码来源:dlgTaskPoint.cpp
示例19: ListPicker
int
ListPicker(SingleWindow &parent, const TCHAR *caption,
unsigned num_items, unsigned initial_value, unsigned item_height,
WndListFrame::PaintItemCallback_t paint_callback,
ListHelpCallback_t _help_callback)
{
assert(num_items <= 0x7fffffff);
assert((num_items == 0 && initial_value == 0) || initial_value < num_items);
assert(item_height > 0);
assert(paint_callback != NULL);
wf = LoadDialog(CallBackTable, parent, !Layout::landscape
? _T("IDR_XML_COMBOPICKER_L")
: _T("IDR_XML_COMBOPICKER"));
assert(wf != NULL);
if (caption != NULL)
wf->SetCaption(caption);
list_control = (WndListFrame *)wf->FindByName(_T("frmComboPopupList"));
assert(list_control != NULL);
list_control->SetItemHeight(item_height);
list_control->SetLength(num_items);
list_control->SetCursorIndex(initial_value);
list_control->SetActivateCallback(OnComboPopupListEnter);
list_control->SetPaintItemCallback(paint_callback);
help_callback = _help_callback;
WndButton *help_button = (WndButton *)wf->FindByName(_T("cmdHelp"));
assert(help_button != NULL);
if (help_callback != NULL)
help_button->SetOnClickNotify(OnHelpClicked);
else
help_button->hide();
int result = wf->ShowModal() == mrOK
? (int)list_control->GetCursorIndex()
: -1;
delete wf;
return result;
}
开发者ID:hnpilot,项目名称:XCSoar,代码行数:43,代码来源:ListPicker.cpp
示例20: dlgConfigWaypointsShowModal
void
dlgConfigWaypointsShowModal()
{
WndForm *wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
Layout::landscape
? _T("IDR_XML_CONFIG_WAYPOINTS_L")
: _T("IDR_XML_CONFIG_WAYPOINTS"));
assert(wf != nullptr);
WaypointsNeedSave = false;
wf->ShowModal();
if (WaypointsNeedSave &&
ShowMessageBox(_("Save changes to waypoint file?"), _("Waypoints edited"),
MB_YESNO | MB_ICONQUESTION) == IDYES)
SaveWaypoints();
delete wf;
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:20,代码来源:Manager.cpp
注:本文中的LoadDialog函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论