本文整理汇总了C++中WndButton类的典型用法代码示例。如果您正苦于以下问题:C++ WndButton类的具体用法?C++ WndButton怎么用?C++ WndButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WndButton类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dlgTeamCodeShowModal
void dlgTeamCodeShowModal(void)
{
WndProperty* wp = NULL;
WndButton *buttonCode = NULL;
wf = NULL;
char filename[MAX_PATH];
if (InfoBoxLayout::landscape)
{
LocalPathS(filename, TEXT("dlgTeamCode_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_TEAMCODE_L"));
if (!wf) return;
}
else
{
LocalPathS(filename, TEXT("dlgTeamCode.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_TEAMCODE"));
if (!wf) return;
}
TCHAR sTmp[32] = { 0 };
if( WayPointList && ValidWayPoint(TeamCodeRefWaypoint)) {
// LKTOKEN [email protected]_ "Team Ref.: "
_tcsncpy(sTmp, gettext(TEXT("[email protected]_")), 20);
_tcsncat(sTmp, WayPointList[TeamCodeRefWaypoint].Name,10);
} else {
// LKTOKEN [email protected]_ "Team code: SET REF!"
_tcsncpy(sTmp, gettext(TEXT("[email protected]_")), 30);
}
wf->SetCaption(sTmp);
// set event for button
buttonCode = ((WndButton *)wf->FindByName(TEXT("cmdSetCode")));
if (buttonCode) {
buttonCode->SetOnClickNotify(OnCodeClicked);
}
// Set unit for range
wp = (WndProperty*)wf->FindByName(TEXT("prpRange"));
if (wp) {
wp->GetDataField()->SetUnits(Units::GetDistanceName());
}
Update();
wf->SetTimerNotify(OnTimerNotify);
wf->ShowModal();
delete wf;
wf=NULL;
}
开发者ID:miza,项目名称:LK8000,代码行数:60,代码来源:dlgTeamCode.cpp
示例2: UpdateButton
static void
UpdateButton(const TCHAR *button, const TCHAR *caption)
{
WndButton* b = (WndButton*)dialog->FindByName(button);
assert(b != NULL);
b->SetCaption(caption);
}
开发者ID:,项目名称:,代码行数:7,代码来源:
示例3: UpdateList
static void
UpdateList()
{
list.clear();
PlaneFileVisitor pfv;
VisitDataFiles(_T("*.xcp"), pfv);
unsigned len = list.size();
if (len > 0)
std::sort(list.begin(), list.end());
plane_list->SetLength(len);
plane_list->invalidate();
WndButton* b = (WndButton*)dialog->FindByName(_T("LoadButton"));
assert(b != NULL);
b->set_enabled(len > 0);
b = (WndButton*)dialog->FindByName(_T("EditButton"));
assert(b != NULL);
b->set_enabled(len > 0);
b = (WndButton*)dialog->FindByName(_T("DeleteButton"));
assert(b != NULL);
b->set_enabled(len > 0);
}
开发者ID:,项目名称:,代码行数:28,代码来源:
示例4: dlgTeamCodeShowModal
void
dlgTeamCodeShowModal(void)
{
WndProperty* wp = NULL;
WndButton *buttonCode = NULL;
wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
Layout::landscape ? _T("IDR_XML_TEAMCODE_L") :
_T("IDR_XML_TEAMCODE"));
if (!wf)
return;
// set event for buttons
buttonCode = ((WndButton *)wf->FindByName(_T("cmdSetCode")));
if (buttonCode)
buttonCode->SetOnClickNotify(OnCodeClicked);
WndButton* cmdSetWaypoint = ((WndButton *)wf->FindByName(_T("cmdSetWaypoint")));
assert(cmdSetWaypoint != NULL);
cmdSetWaypoint->SetOnClickNotify(OnSetWaypointClicked);
// 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:Mrdini,项目名称:XCSoar,代码行数:35,代码来源:dlgTeamCode.cpp
示例5: LoadWindow
void
MacCreadyEditPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
LoadWindow(call_back_table, parent, _T("IDR_XML_INFOBOXMACCREADYEDIT"));
TCHAR caption[16];
WndButton *button = (WndButton *)form.FindByName(_T("cmdPlusBig"));
assert(button != NULL);
FormatUserVerticalSpeed(
Units::ToSysVSpeed(GetUserVerticalSpeedStep() * 5), caption, false);
button->SetCaption(caption);
button = (WndButton *)form.FindByName(_T("cmdPlusSmall"));
assert(button != NULL);
FormatUserVerticalSpeed(
Units::ToSysVSpeed(GetUserVerticalSpeedStep()), caption, false);
button->SetCaption(caption);
button = (WndButton *)form.FindByName(_T("cmdMinusBig"));
assert(button != NULL);
FormatUserVerticalSpeed(
Units::ToSysVSpeed(-GetUserVerticalSpeedStep() * 5), caption, false);
button->SetCaption(caption);
button = (WndButton *)form.FindByName(_T("cmdMinusSmall"));
assert(button != NULL);
FormatUserVerticalSpeed(
Units::ToSysVSpeed(-GetUserVerticalSpeedStep()), caption, false);
button->SetCaption(caption);
}
开发者ID:damianob,项目名称:xcsoar,代码行数:31,代码来源:MacCreadyEdit.cpp
示例6: LoadWindow
void
PolarConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
instance = this;
loading = true;
LoadWindow(polar_callbacks, parent,
Layout::landscape
? _T("IDR_XML_POLARCONFIGPANEL_L")
: _T("IDR_XML_POLARCONFIGPANEL"));
buttonList = (WndButton *)ConfigPanel::GetForm()
.FindByName(_T("cmdLoadInternalPolar"));
assert(buttonList != NULL);
buttonList->SetOnClickNotify(OnLoadInternal);
buttonImport = (WndButton *)ConfigPanel::GetForm()
.FindByName(_T("cmdLoadPolarFile"));
assert(buttonImport != NULL);
buttonImport->SetOnClickNotify(OnLoadFromFile);
buttonExport = (WndButton *)ConfigPanel::GetForm()
.FindByName(_T("cmdSavePolarFile"));
assert(buttonExport != NULL);
buttonExport->SetOnClickNotify(OnExport);
SetLiftFieldStepAndMax(_T("prpPolarW1"));
SetLiftFieldStepAndMax(_T("prpPolarW2"));
SetLiftFieldStepAndMax(_T("prpPolarW3"));
const ComputerSettings &settings = XCSoarInterface::GetComputerSettings();
UpdatePolarPoints(settings.plane.v1, settings.plane.v2, settings.plane.v3,
settings.plane.w1, settings.plane.w2, settings.plane.w3);
LoadFormProperty(form, _T("prpPolarReferenceMass"),
settings.plane.reference_mass);
LoadFormProperty(form, _T("prpPolarDryMass"), settings.plane.dry_mass);
LoadFormProperty(form, _T("prpPolarMaxBallast"), settings.plane.max_ballast);
LoadFormProperty(form, _T("prpPolarWingArea"), settings.plane.wing_area);
LoadFormProperty(form, _T("prpMaxManoeuveringSpeed"), ugHorizontalSpeed,
settings.plane.max_speed);
UpdatePolarTitle();
UpdatePolarInvalidLabel();
const ComputerSettings &settings_computer = XCSoarInterface::GetComputerSettings();
LoadFormProperty(form, _T("prpHandicap"),
settings_computer.plane.handicap);
LoadFormProperty(form, _T("prpBallastSecsToEmpty"),
settings_computer.plane.dump_time);
loading = false;
}
开发者ID:,项目名称:,代码行数:56,代码来源:
示例7: LoadWindow
void
PolarConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
instance = this;
loading = true;
LoadWindow(polar_callbacks, parent,
Layout::landscape
? _T("IDR_XML_POLARCONFIGPANEL_L")
: _T("IDR_XML_POLARCONFIGPANEL"));
buttonList = (WndButton *)ConfigPanel::GetForm()
.FindByName(_T("cmdLoadInternalPolar"));
assert(buttonList != NULL);
buttonList->SetOnClickNotify(OnLoadInternal);
buttonImport = (WndButton *)ConfigPanel::GetForm()
.FindByName(_T("cmdLoadPolarFile"));
assert(buttonImport != NULL);
buttonImport->SetOnClickNotify(OnLoadFromFile);
buttonExport = (WndButton *)ConfigPanel::GetForm()
.FindByName(_T("cmdSavePolarFile"));
assert(buttonExport != NULL);
buttonExport->SetOnClickNotify(OnExport);
const ComputerSettings &settings = CommonInterface::GetComputerSettings();
DockWindow &dock = *(DockWindow *)form.FindByName(_T("shape"));
PolarShapeEditWidget *shape_editor =
new PolarShapeEditWidget(settings.plane.polar_shape);
dock.SetWidget(shape_editor);
shape_editor->SetDataAccessCallback(OnFieldData);
LoadFormProperty(form, _T("prpPolarReferenceMass"),
settings.plane.reference_mass);
LoadFormProperty(form, _T("prpPolarDryMass"), settings.plane.dry_mass);
LoadFormProperty(form, _T("prpPolarMaxBallast"), settings.plane.max_ballast);
LoadFormProperty(form, _T("prpPolarWingArea"), settings.plane.wing_area);
LoadFormProperty(form, _T("prpMaxManoeuveringSpeed"), UnitGroup::HORIZONTAL_SPEED,
settings.plane.max_speed);
UpdatePolarTitle();
UpdatePolarInvalidLabel();
const ComputerSettings &settings_computer = CommonInterface::GetComputerSettings();
LoadFormProperty(form, _T("prpHandicap"),
settings_computer.plane.handicap);
LoadFormProperty(form, _T("prpBallastSecsToEmpty"),
settings_computer.plane.dump_time);
loading = false;
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:56,代码来源:PolarConfigPanel.cpp
示例8: SetButtons
static void
SetButtons()
{
WndButton* wb;
if ((wb = (WndButton *)wf->FindByName(_T("cmdDump"))) != NULL) {
wb->set_visible(glide_polar.HasBallast());
wb->SetCaption(XCSoarInterface::GetComputerSettings().ballast_timer_active ?
_("Stop") : _("Dump"));
}
}
开发者ID:,项目名称:,代码行数:11,代码来源:
示例9: UpdateDeviceSetupButton
static void
UpdateDeviceSetupButton(unsigned DeviceIdx, const TCHAR *Name)
{
assert(DeviceIdx < 26);
TCHAR button_name[] = _T("cmdSetupDeviceA");
button_name[(sizeof(button_name) / sizeof(button_name[0])) - 2] += DeviceIdx;
WndButton *wb = (WndButton *)wf->FindByName(button_name);
if (wb != NULL)
wb->set_visible(Name != NULL && _tcscmp(Name, _T("Vega")) == 0);
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:12,代码来源:DevicesConfigPanel.cpp
示例10: UpdateAckButton
static void
UpdateAckButton()
{
assert(airspace);
if (airspace_warnings == NULL)
return;
WndButton* ack = (WndButton*)wf->FindByName(_T("cmdAcknowledge"));
assert(ack != NULL);
ack->SetCaption(airspace_warnings->get_ack_day(*airspace) ?
_("Enable") : _("Ack Day"));
}
开发者ID:damianob,项目名称:xcsoar,代码行数:13,代码来源:dlgAirspaceDetails.cpp
示例11: switch
bool
AnalysisWidget::KeyPress(unsigned key_code)
{
switch (key_code) {
case KEY_LEFT:
#ifdef GNAV
case '6':
// Key F14 added in order to control the Analysis-Pages with the Altair RemoteStick
case KEY_F14:
#endif
previous_button.SetFocus();
NextPage(-1);
return true;
case KEY_RIGHT:
#ifdef GNAV
case '7':
// Key F13 added in order to control the Analysis-Pages with the Altair RemoteStick
case KEY_F13:
#endif
next_button.SetFocus();
NextPage(+1);
return true;
default:
return false;
}
}
开发者ID:,项目名称:,代码行数:28,代码来源:
示例12: layout
void
AnalysisWidget::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
const Layout layout(rc);
ButtonWindowStyle button_style;
button_style.Hide();
button_style.TabStop();
info.Create(parent, layout.info);
const auto &button_look = dialog.GetLook().button;
details_button.Create(parent, button_look, _T("Calc"), layout.details_button,
button_style, *this, DETAILS);
previous_button.Create(parent, button_look, _T("<"), layout.previous_button,
button_style, *this, PREVIOUS);
next_button.Create(parent, button_look, _T(">"), layout.next_button,
button_style, *this, NEXT);
close_button.Create(parent, button_look, _("Close"), layout.close_button,
button_style, dialog, mrOK);
WindowStyle style;
style.Hide();
chart.Create(parent, layout.main, style);
}
开发者ID:,项目名称:,代码行数:26,代码来源:
示例13: UpdateButtons
void UpdateButtons() {
unsigned length = GetList().GetLength();
unsigned cursor = GetList().GetCursorIndex();
add_button->SetEnabled(length < settings.MAX_PAGES);
delete_button->SetEnabled(length >= 2);
move_up_button->SetEnabled(cursor > 0);
move_down_button->SetEnabled(cursor + 1 < length);
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:9,代码来源:PagesConfigPanel.cpp
示例14:
void
AirspaceConfigPanel::SetButtonsVisible(bool active)
{
if (buttonColors != NULL)
buttonColors->SetVisible(active);
if (buttonMode != NULL)
buttonMode->SetVisible(active);
}
开发者ID:rjsikarwar,项目名称:XCSoar,代码行数:9,代码来源:AirspaceConfigPanel.cpp
示例15: UpdateVisibility
void UpdateVisibility() {
assert(visible);
edit_button->SetVisible(show_edit);
mutate_button->SetVisible(show_mutate);
down_button->SetVisible(show_down);
up_button->SetVisible(show_up);
clear_all_button->Show();
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:9,代码来源:TaskEditPanel.cpp
示例16:
void
InterfaceConfigPanel::Show(const PixelRect &rc)
{
buttonFonts->SetText(_("Fonts"));
buttonFonts->SetOnClickNotify(dlgConfigFontsShowModal);
buttonFonts->Show();
RowFormWidget::Show(rc);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:9,代码来源:InterfaceConfigPanel.cpp
示例17: Move
void Move(const PixelRect &rc) override {
const Layout layout(rc, geometry);
RowFormWidget::Move(layout.form);
copy_button.Move(layout.copy_button);
paste_button.Move(layout.paste_button);
close_button.Move(layout.close_button);
}
开发者ID:,项目名称:,代码行数:9,代码来源:
示例18:
void
InterfaceConfigPanel::Show(const PixelRect &rc)
{
buttonFonts->set_text(_("Fonts"));
buttonFonts->SetOnClickNotify(OnFonts);
buttonFonts->show();
RowFormWidget::Show(rc);
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:9,代码来源:InterfaceConfigPanel.cpp
示例19:
void
FlightSetupPanel::SetButtons()
{
dump_button->SetVisible(polar_settings.glide_polar_task.HasBallast());
const ComputerSettings &settings = CommonInterface::GetComputerSettings();
dump_button->SetCaption(settings.polar.ballast_timer_active
? _("Stop") : _("Dump"));
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:9,代码来源:dlgBasicSettings.cpp
示例20: Hide
void Hide() override {
RowFormWidget::Hide();
copy_button.Hide();
paste_button.Hide();
close_button.Hide();
for (auto &i : previews)
i.Hide();
}
开发者ID:,项目名称:,代码行数:10,代码来源:
注:本文中的WndButton类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论