當前位置: 首頁>>代碼示例>>C++>>正文


C++ DeclareCallBackEntry函數代碼示例

本文整理匯總了C++中DeclareCallBackEntry函數的典型用法代碼示例。如果您正苦於以下問題:C++ DeclareCallBackEntry函數的具體用法?C++ DeclareCallBackEntry怎麽用?C++ DeclareCallBackEntry使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DeclareCallBackEntry函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: CloseClicked

    return;

  NOAAStore::RemoveStation(station_index);
  NOAAStore::SaveToProfile();

  wf->SetModalResult(mrOK);
}

static void
CloseClicked(gcc_unused WndButton &Sender)
{
  wf->SetModalResult(mrOK);
}

static CallBackTableEntry CallBackTable[] = {
  DeclareCallBackEntry(UpdateClicked),
  DeclareCallBackEntry(RemoveClicked),
  DeclareCallBackEntry(CloseClicked),
  DeclareCallBackEntry(NULL)
};

void
dlgNOAADetailsShowModal(SingleWindow &parent, unsigned _station_index)
{
  assert(_station_index < NOAAStore::Count());
  station_index = _station_index;

  wf = LoadDialog(CallBackTable, parent, Layout::landscape ?
                  _T("IDR_XML_NOAA_DETAILS_L") : _T("IDR_XML_NOAA_DETAILS"));
  assert(wf != NULL);
開發者ID:macsux,項目名稱:XCSoar,代碼行數:30,代碼來源:dlgNOAADetails.cpp

示例2: DeclareCallBackEntry

      continue;
    } else {
      *p3 = *p2;
    }
    p3++;
  }
  *p3 = _T('\0');
#else
  const TCHAR *buffer3 = buffer2;
#endif

  ((WndProperty *)wf->FindByName(control))->SetText(buffer3);
}

static CallBackTableEntry CallBackTable[] = {
  DeclareCallBackEntry(OnClose),
  DeclareCallBackEntry(OnNext),
  DeclareCallBackEntry(OnPrev),
  DeclareCallBackEntry(OnLogoPaint),
  DeclareCallBackEntry(NULL)
};

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);
開發者ID:Mrdini,項目名稱:XCSoar,代碼行數:31,代碼來源:dlgCredits.cpp

示例3: OnFileListItemPaint

    native_view->openFile(path);
}

static void
OnFileListItemPaint(Canvas &canvas, const PixelRect paint_rc, unsigned i)
{
    auto file = waypoint->files_external.begin();
    std::advance(file, i);
    canvas.text(paint_rc.left + Layout::Scale(2),
                paint_rc.top + Layout::Scale(2), file->c_str());
}
#endif

static gcc_constexpr_data CallBackTableEntry CallBackTable[] = {
    DeclareCallBackEntry(OnMagnifyClicked),
    DeclareCallBackEntry(OnShrinkClicked),
    DeclareCallBackEntry(OnNextClicked),
    DeclareCallBackEntry(OnPrevClicked),
    DeclareCallBackEntry(OnGotoClicked),
    DeclareCallBackEntry(OnCloseClicked),
    DeclareCallBackEntry(OnImagePaint),
    DeclareCallBackEntry(NULL)
};

static void
UpdateCaption(const TCHAR *waypoint_name, int8_t file_num)
{
    StaticString<256> buffer;
    buffer.Format(_T("%s: %s"), _("Waypoint"), waypoint_name);
開發者ID:damianob,項目名稱:xcsoar_mess,代碼行數:29,代碼來源:dlgWaypointDetails.cpp

示例4: PageSwitched

    // JMW NO! This disables editing!  //  case VK_RIGHT:
  case '7':
    ((WndButton *)wf->FindByName(_T("cmdNext")))->set_focus();
    tabbed->NextPage();
    PageSwitched();
    //((WndButton *)wf->FindByName(_T("cmdNext")))->SetFocused(true, NULL);
    return true;

  default:
    return false;
  }
}

static CallBackTableEntry CallBackTable[] = {
  DeclareCallBackEntry(OnNextClicked),
  DeclareCallBackEntry(OnPrevClicked),
  DeclareCallBackEntry(OnDemoClicked),
  DeclareCallBackEntry(OnSaveClicked),
  DeclareCallBackEntry(OnSchemeVegaClicked),
  DeclareCallBackEntry(OnSchemeBorgeltClicked),
  DeclareCallBackEntry(OnSchemeCambridgeClicked),
  DeclareCallBackEntry(OnSchemeZanderClicked),
  DeclareCallBackEntry(NULL)
};

static void
FillAudioEnums(const TCHAR* name)
{
  WndProperty *wp;
  TCHAR fullname[100];
開發者ID:hnpilot,項目名稱:XCSoar,代碼行數:30,代碼來源:dlgConfigurationVario.cpp

示例5: OnRateData

OnRateData(DataField *Sender, DataField::DataAccessMode Mode)
{
  DataFieldFloat &df = *(DataFieldFloat *)Sender;

  switch (Mode) {
  case DataField::daChange:
    replay->SetTimeScale(df.GetAsFixed());
    break;

  case DataField::daSpecial:
    return;
  }
}

static constexpr CallBackTableEntry CallBackTable[] = {
  DeclareCallBackEntry(OnStopClicked),
  DeclareCallBackEntry(OnStartClicked),
  DeclareCallBackEntry(OnRateData),
  DeclareCallBackEntry(NULL)
};

void
ShowReplayDialog()
{
  wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
                  _T("IDR_XML_LOGGERREPLAY"));
  if (!wf)
    return;

  WndProperty* wp;
開發者ID:StefanL74,項目名稱:XCSoar,代碼行數:30,代碼來源:ReplayDialog.cpp

示例6: OnCloseClicked

}

static void OnCloseClicked(WindowControl * Sender){
    (void)Sender;
	wf->SetModalResult(mrOK);
}


static void OnLookupClicked(WindowControl * Sender){
  (void)Sender;
  dlgAirspaceSelect();
}


static CallBackTableEntry_t CallBackTable[]={
  DeclareCallBackEntry(OnAirspacePaintListItem),
  DeclareCallBackEntry(OnAirspaceListInfo),
  DeclareCallBackEntry(OnCloseClicked),
  DeclareCallBackEntry(OnLookupClicked),
  DeclareCallBackEntry(NULL)
};


bool dlgAirspaceShowModal(bool coloredit){

  colormode = coloredit;

  ItemIndex = -1;

  if (!InfoBoxLayout::landscape) {
    char filename[MAX_PATH];
開發者ID:jarda-manana,項目名稱:LK8000,代碼行數:31,代碼來源:dlgAirspace.cpp

示例7: OnImagePaint

static void
OnImagePaint(WindowControl *Sender, Canvas &canvas)
{
  (void)Sender;

  if (page == 4) {
    BitmapCanvas bitmap_canvas(canvas, jpgimage1);
    canvas.copy(bitmap_canvas);
  } else if (page == 5) {
    BitmapCanvas bitmap_canvas(canvas, jpgimage2);
    canvas.copy(bitmap_canvas);
  }
}

static CallBackTableEntry_t CallBackTable[] = {
    DeclareCallBackEntry(OnNextClicked),
    DeclareCallBackEntry(OnPrevClicked),
    DeclareCallBackEntry(NULL)
};

void 
dlgWayPointDetailsShowModal(SingleWindow &parent, const Waypoint& way_point)
{
  selected_waypoint = &way_point;

  TCHAR sTmp[128];
  double sunsettime;
  int sunsethours;
  int sunsetmins;
  WndProperty *wp;
開發者ID:Plantain,項目名稱:XCSoar,代碼行數:30,代碼來源:dlgWayPointDetails.cpp

示例8: OnFriendMagentaClicked

}

static void
OnFriendMagentaClicked(gcc_unused WndButton &Sender)
{
  FlarmFriends::SetFriendColor(target_id, FlarmFriends::MAGENTA);
}

static void
OnFriendClearClicked(gcc_unused WndButton &Sender)
{
  FlarmFriends::SetFriendColor(target_id, FlarmFriends::NONE);
}

static CallBackTableEntry CallBackTable[] = {
  DeclareCallBackEntry(OnTimerNotify),
  DeclareCallBackEntry(NULL)
};

/**
 * The function opens the FLARM Traffic Details dialog
 */
void
dlgFlarmTrafficDetailsShowModal(FlarmId id)
{
  if (wf)
    return;

  target_id = id;

  // Load dialog from XML
開發者ID:macsux,項目名稱:XCSoar,代碼行數:31,代碼來源:dlgFlarmTrafficDetails.cpp

示例9: OnRemoveFromTaskClicked

  wf->SetModalResult(mrOK);
}


static void OnRemoveFromTaskClicked(WindowControl * Sender){
	(void)Sender;
  LockTaskData();
  RemoveWaypoint(SelectedWaypoint);
  RefreshTask();
  UnlockTaskData();
  wf->SetModalResult(mrOK);
}


static CallBackTableEntry_t CallBackTable[]={
  DeclareCallBackEntry(OnNextClicked),
  DeclareCallBackEntry(OnPrevClicked),
  DeclareCallBackEntry(OnPaintDetailsListItem),
  DeclareCallBackEntry(OnDetailsListInfo),
  DeclareCallBackEntry(OnPaintWaypointPicto),
  DeclareCallBackEntry(NULL)
};



void dlgWayPointDetailsShowModal(short mypage){

  TCHAR sTmp[128];
  double sunsettime;
  int sunsethours;
  int sunsetmins;
開發者ID:rafagdn,項目名稱:LK8000,代碼行數:31,代碼來源:dlgWayPointDetails.cpp

示例10: if

    wf->SetModalResult(mrOK);
  } else if (answer == IDNO) {
    airspace_warnings.acknowledge_day(*airspace, false);
    wf->SetModalResult(mrOK);
  }
}

static void
OnCloseClicked(WindowControl * Sender)
{
  (void)Sender;
  wf->SetModalResult(mrOK);
}

static CallBackTableEntry_t CallBackTable[] = {
  DeclareCallBackEntry(OnAcknowledgeClicked),
  DeclareCallBackEntry(OnCloseClicked),
  DeclareCallBackEntry(NULL)
};

static void
SetValues(void)
{
  assert(airspace);

  WndProperty* wp;

  wp = (WndProperty*)wf->FindByName(_T("prpName"));
  if (wp) {
    wp->SetText(airspace->get_name_text(true).c_str());
    wp->RefreshDisplay();
開發者ID:Plantain,項目名稱:XCSoar,代碼行數:31,代碼來源:dlgAirspaceDetails.cpp

示例11: _


InfoBoxContentMacCready::PanelContent InfoBoxContentMacCready::Panels[] = {
  InfoBoxContentMacCready::PanelContent (
    _("Edit"),
    (*InfoBoxContentMacCready::PnlEditLoad)),

  InfoBoxContentMacCready::PanelContent (
    _("Setup"),
    (*InfoBoxContentMacCready::PnlSetupLoad),
    NULL,
    (*InfoBoxContentMacCready::PnlSetupPreShow))
};

CallBackTableEntry InfoBoxContentMacCready::CallBackTable[] = {
  DeclareCallBackEntry(InfoBoxContentMacCready::PnlEditOnPlusSmall),
  DeclareCallBackEntry(InfoBoxContentMacCready::PnlEditOnPlusBig),
  DeclareCallBackEntry(InfoBoxContentMacCready::PnlEditOnMinusSmall),
  DeclareCallBackEntry(InfoBoxContentMacCready::PnlEditOnMinusBig),

  DeclareCallBackEntry(InfoBoxContentMacCready::PnlSetupOnSetup),
  DeclareCallBackEntry(InfoBoxContentMacCready::PnlSetupOnMode),

  DeclareCallBackEntry(NULL)
};

InfoBoxContentMacCready::DialogContent InfoBoxContentMacCready::dlgContent = {
    InfoBoxContentMacCready::PANELSIZE,
    InfoBoxContentMacCready::Panels,
    InfoBoxContentMacCready::CallBackTable
};
開發者ID:joachimwieland,項目名稱:xcsoar-jwieland,代碼行數:29,代碼來源:MacCready.cpp

示例12: VegaParametersWidget

  tabbed->AddPage(new VegaParametersWidget(look, *device,
                                           flarm_id_parameters));
  tabbed->AddPage(new VegaParametersWidget(look, *device,
                                           flarm_repeat_parameters));
  tabbed->AddPage(new VegaParametersWidget(look, *device, alert_parameters));
  tabbed->AddPage(new VegaParametersWidget(look, *device, limit_parameters));

  tabbed->AddPage(new VegaSchemeButtonsPage(look));

  tabbed->AddPage(new VegaParametersWidget(look, *device, display_parameters));

  return tabbed;
}

static gcc_constexpr_data CallBackTableEntry CallBackTable[] = {
  DeclareCallBackEntry(OnNextClicked),
  DeclareCallBackEntry(OnPrevClicked),
  DeclareCallBackEntry(OnDemoClicked),
  DeclareCallBackEntry(OnSaveClicked),
  DeclareCallBackEntry(OnCloseClicked),
  DeclareCallBackEntry(OnCreatePager),
  DeclareCallBackEntry(NULL)
};

bool
dlgConfigurationVarioShowModal(Device &_device)
{
  device = (VegaDevice *)&_device;
  changed = dirty = false;

  wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
開發者ID:davidswelt,項目名稱:XCSoar,代碼行數:31,代碼來源:VegaConfigurationDialog.cpp

示例13: OnTaskRulesClicked

  wf->SetModalResult(mrOK);
}


static void OnTaskRulesClicked(WindowControl * Sender){
  (void)Sender;
  wf->SetVisible(false);
  if (dlgTaskRules()) {
    TaskModified = true;
  }
  wf->SetVisible(true);
}


static CallBackTableEntry_t CallBackTable[]={
  DeclareCallBackEntry(OnSelectClicked),
  DeclareCallBackEntry(OnDetailsClicked),
  DeclareCallBackEntry(OnRemoveClicked),
  DeclareCallBackEntry(OnCloseClicked),
  DeclareCallBackEntry(OnStartPointClicked),
  DeclareCallBackEntry(OnMoveAfterClicked),
  DeclareCallBackEntry(OnMoveBeforeClicked),
  DeclareCallBackEntry(OnAATEnabled),
  DeclareCallBackEntry(OnTaskRulesClicked),
  DeclareCallBackEntry(NULL)
};


void dlgTaskWaypointShowModal(int itemindex, int tasktype, bool addonly){
  wf = NULL;
  
開發者ID:miza,項目名稱:LK8000,代碼行數:30,代碼來源:dlgTaskWaypoint.cpp

示例14: SetPrimaryDataPath

{
  if (StringIsEmpty(path))
    return;

  Profile::SetFiles(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));

  File::Touch(path);
}

static constexpr CallBackTableEntry CallBackTable[] = {
  DeclareCallBackEntry(OnLogoPaint),
  DeclareCallBackEntry(OnCloseClicked),
  DeclareCallBackEntry(OnQuitClicked),
  DeclareCallBackEntry(NULL)
};

bool
dlgStartupShowModal()
{
  LogFormat("Startup dialog");

  logo = new LogoView();

  wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
                  Layout::landscape ? _T("IDR_XML_STARTUP_L") :
                                      _T("IDR_XML_STARTUP"));
開發者ID:StefanL74,項目名稱:XCSoar,代碼行數:31,代碼來源:dlgStartup.cpp

示例15: OnAckForTimeClicked

    case VK_RETURN:
      OnAckForTimeClicked(Sender);
      return(0);
    case VK_ESCAPE:
      OnCloseClicked(Sender);
      return(0);
  }

  return(1);
  
}



static CallBackTableEntry_t CallBackTable[]={
  DeclareCallBackEntry(OnAckForTimeClicked),
  DeclareCallBackEntry(OnCloseClicked),
  DeclareCallBackEntry(NULL)
};


void dlgLKAirspaceFill()
{
  if (msg.warnlevel != airspace_copy.WarningLevel()) {
    // we can automatically close the dialog when the warning level changes, probably new msg waiting in the queue
    dlg->SetModalResult(mrOK);
  }
  
    //Fill up dialog data
    WndProperty* wp;    
    WndButton* wb;    
開發者ID:braun,項目名稱:LK8000,代碼行數:31,代碼來源:dlgLKAirspaceWarning.cpp


注:本文中的DeclareCallBackEntry函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。