当前位置: 首页>>代码示例>>C++>>正文


C++ SubForm类代码示例

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


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

示例1: ShowFormControl

void
ShowFormControl(SubForm &form, const TCHAR *control_name, bool visible)
{
  Window *window = form.FindByName(control_name);
  assert(window != NULL);
  window->SetVisible(visible);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:7,代码来源:Util.cpp

示例2: SetFormControlEnabled

void
SetFormControlEnabled(SubForm &form, const TCHAR *control_name, bool enabled)
{
  Window *window = form.FindByName(control_name);
  assert(window != NULL);
  window->SetEnabled(enabled);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:7,代码来源:Util.cpp

示例3: ShowOptionalFormControl

void
ShowOptionalFormControl(SubForm &form, const TCHAR *control_name,
                        bool visible)
{
  Window *window = form.FindByName(control_name);
  if (window != NULL)
    window->SetVisible(visible);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:8,代码来源:Util.cpp

示例4: SetDataAccessCallback

static void
SetDataAccessCallback(SubForm &form, const TCHAR *name,
                      DataField::DataAccessCallback cb)
{
  WndProperty *edit = (WndProperty *)form.FindByName(name);
  assert(edit != nullptr);

  DataField *df = edit->GetDataField();
  assert(df != nullptr);
  df->SetDataAccessCallback(cb);
}
开发者ID:j-konopka,项目名称:XCSoar-TE,代码行数:11,代码来源:TargetDialog.cpp

示例5: SetFormValue

void
SetFormValue(SubForm &form, const TCHAR *control_name, const TCHAR *value)
{
  assert(control_name != NULL);
  assert(value != NULL);

  WndProperty *ctl = (WndProperty *)form.FindByName(control_name);
  assert(ctl != NULL);

  ctl->SetText(value);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:11,代码来源:Util.cpp

示例6: GetFormValueInteger

int
GetFormValueInteger(const SubForm &form, const TCHAR *control_name)
{
  assert(control_name != NULL);

  const WndProperty *control =
    (const WndProperty *)form.FindByName(control_name);
  assert(control != NULL);

  return control->GetDataField()->GetAsInteger();
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:11,代码来源:Util.cpp

示例7: GetFormValueFixed

fixed
GetFormValueFixed(const SubForm &form, const TCHAR *control_name)
{
  const WndProperty *control =
    (const WndProperty *)form.FindByName(control_name);
  assert(control != NULL);

  const DataFieldFloat &df = *(const DataFieldFloat *)control->GetDataField();
  assert(df.GetType() == DataField::Type::REAL);
  return df.GetAsFixed();
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:11,代码来源:Util.cpp

示例8: LoadFormProperty

void
LoadFormProperty(SubForm &form, const TCHAR *control_name, unsigned int value)
{
  assert(control_name != NULL);

  WndProperty *ctl = (WndProperty *)form.FindByName(control_name);
  if (ctl == NULL)
    return;

  ctl->GetDataField()->SetAsInteger(value);
  ctl->RefreshDisplay();
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:12,代码来源:Util.cpp

示例9: LoadFormPropertyEnum

void
LoadFormPropertyEnum(SubForm &form, const TCHAR *control_name, int value)
{
  assert(control_name != NULL);

  WndProperty *ctl = (WndProperty *)form.FindByName(control_name);
  assert(ctl != NULL);

  DataFieldEnum &df = *(DataFieldEnum *)ctl->GetDataField();
  assert(df.GetType() == DataField::Type::ENUM);
  df.Set(value);
  ctl->RefreshDisplay();
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:13,代码来源:Util.cpp

示例10: GetFormValueBoolean

bool
GetFormValueBoolean(const SubForm &form, const TCHAR *control_name)
{
  assert(control_name != NULL);

  const WndProperty *control =
    (const WndProperty *)form.FindByName(control_name);
  assert(control != NULL);

  const DataFieldBoolean &df =
    *(const DataFieldBoolean *)control->GetDataField();
  assert(df.GetType() == DataField::Type::BOOLEAN);
  return df.GetAsBoolean();
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:14,代码来源:Util.cpp

示例11: LoadOptionalFormProperty

void
LoadOptionalFormProperty(SubForm &form, const TCHAR *control_name,
                         UnitGroup unit_group, fixed value)
{
  assert(control_name != NULL);

  WndProperty *ctl = (WndProperty *)form.FindByName(control_name);
  if (ctl == NULL)
    return;

  Unit unit = Units::GetUserUnitByGroup(unit_group);
  DataFieldFloat &df = *(DataFieldFloat *)ctl->GetDataField();
  assert(df.GetType() == DataField::Type::REAL);
  df.SetUnits(Units::GetUnitName(unit));
  df.Set(Units::ToUserUnit(value, unit));
  ctl->RefreshDisplay();
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:17,代码来源:UnitUtil.cpp

示例12: Unprepare

 /**
  * Clears and deletes the windows created by LoadWindow
  * during Prepare() associated with the WindowWidget
  */
 virtual void Unprepare() override {
   form.Clear();
 }
开发者ID:j-konopka,项目名称:XCSoar-TE,代码行数:7,代码来源:XMLWidget.hpp


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