本文整理汇总了C++中SetButton函数的典型用法代码示例。如果您正苦于以下问题:C++ SetButton函数的具体用法?C++ SetButton怎么用?C++ SetButton使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetButton函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WXUNUSED
void TranscriptionToolBar::OnEndOff(wxCommandEvent & WXUNUSED(event))
{
//If IO is busy, abort immediately
if (gAudioIO->IsBusy()){
SetButton(false,mButtons[TTB_EndOff]);
return;
}
mVk->AdjustThreshold(GetSensitivity());
AudacityProject *p = GetActiveProject();
auto t = *p->GetTracks()->Any< const WaveTrack >().begin();
if(t) {
auto wt = static_cast<const WaveTrack*>(t);
sampleCount start, len;
GetSamples(wt, &start, &len);
//Adjust length to end if selection is null
if(len == 0) {
len = start;
start = 0;
}
auto newEnd = mVk->OffBackward(*wt, start + len, len);
double newpos = newEnd.as_double() / wt->GetRate();
p->SetSel1(newpos);
p->RedrawProject();
SetButton(false, mButtons[TTB_EndOff]);
}
}
示例2: WXUNUSED
void TranscriptionToolBar::OnStartOff(wxCommandEvent & WXUNUSED(event))
{
//If IO is busy, abort immediately
if (gAudioIO->IsBusy()){
SetButton(false,mButtons[TTB_StartOff]);
return;
}
mVk->AdjustThreshold(GetSensitivity());
AudacityProject *p = GetActiveProject();
TrackList *tl = p->GetTracks();
TrackListOfKindIterator iter(Track::Wave, tl);
SetButton(false, mButtons[TTB_StartOff]);
Track *t = iter.First(); //Make a track
if(t) {
auto wt = static_cast<const WaveTrack*>(t);
sampleCount start, len;
GetSamples(wt, &start, &len);
//Adjust length to end if selection is null
//if(len == 0)
//len = wt->GetSequence()->GetNumSamples()-start;
auto newstart = mVk->OffForward(*wt, start, len);
double newpos = newstart.as_double() / wt->GetRate();
p->SetSel0(newpos);
p->RedrawProject();
SetButton(false, mButtons[TTB_StartOn]);
}
}
示例3: ShioHtsClick
short ShioHtsClick(DialogPtr dialog, short itemNum, long lParam, VOIDPTR data)
{
switch (itemNum) {
case SHIOHTSCANCEL: return SHIOHTSCANCEL;
case SHIOHTSOK:
sDialogStandingWave = GetButton (dialog, SHIOHTSSTANDINGWAVE);
sDialogScaleFactor = EditText2Float(dialog, SHIOHTSSCALEFACTOR);
return itemNum;
case SHIOHTSSTANDINGWAVE:
// ToggleButton(dialog, itemNum);
// ToggleButton(dialog, SHIOHTSPROGRESSIVEWAVE);
//CheckNumberTextItem(dialog, itemNum, FALSE);
// break;
case SHIOHTSPROGRESSIVEWAVE:
SetButton(dialog, SHIOHTSSTANDINGWAVE, itemNum == SHIOHTSSTANDINGWAVE);
SetButton(dialog, SHIOHTSPROGRESSIVEWAVE, itemNum == SHIOHTSPROGRESSIVEWAVE);
//ToggleButton(dialog, itemNum);
// ToggleButton(dialog, SHIOHTSSTANDINGWAVE);
//CheckNumberTextItem(dialog, itemNum, FALSE);
break;
case SHIOHTSSCALEFACTOR:
CheckNumberTextItem(dialog, itemNum, TRUE);
break;
}
return 0;
}
示例4: WXUNUSED
void TranscriptionToolBar::OnEndOff(wxCommandEvent & WXUNUSED(event))
{
//If IO is busy, abort immediately
if (gAudioIO->IsBusy()){
SetButton(false,mButtons[TTB_EndOff]);
return;
}
mVk->AdjustThreshold(GetSensitivity());
AudacityProject *p = GetActiveProject();
TrackList *tl = p->GetTracks();
TrackListOfKindIterator iter(Track::Wave, tl);
Track *t = iter.First(); //Make a track
if(t) {
sampleCount start,len;
GetSamples((WaveTrack*)t, &start,&len);
//Adjust length to end if selection is null
if(len == 0) {
len = start;
start = 0;
}
sampleCount newEnd = mVk->OffBackward(*(WaveTrack*)t,start+ len,len);
double newpos = newEnd / ((WaveTrack*)t)->GetRate();
p->SetSel1(newpos);
p->RedrawProject();
SetButton(false, mButtons[TTB_EndOff]);
}
}
示例5: SetButton
void TwoFieldDatePickerDialog::Init(
/* [in] */ IContext* context,
/* [in] */ Int32 theme,
/* [in] */ OnValueSetListener* callBack,
/* [in] */ Int32 year,
/* [in] */ Int32 positionInYear,
/* [in] */ Double minValue,
/* [in] */ Double maxValue)
{
AlertDialog::constructor(context, theme);
mCallBack = callBack;
AutoPtr<ICharSequence> setText;
context->GetText(
R::string::date_picker_dialog_set, (ICharSequence**)&setText);
SetButton(BUTTON_POSITIVE, setText, this);
AutoPtr<ICharSequence> cancelText;
context->GetText(Elastos::Droid::R::string::cancel, (ICharSequence**)&cancelText);
SetButton(BUTTON_NEGATIVE, cancelText,
(IDialogInterfaceOnClickListener*) NULL);
SetIcon(0);
mPicker = CreatePicker(context, minValue, maxValue);
SetView(IView::Probe(mPicker));
mPicker->Init(year, positionInYear, this);
}
示例6: strlen
int *IPDialog(char message[80],char *text,void (*option)())
{
int i;
char letter[2];
hud.numbuttons = 14;
hud.buttonfocus = 0;
hud.subwindow = 1;
hud.subwindowinfo = strlen(text);
hud.readyreturn = -1;
hud.optionrun[0] = option;
hud.editstring = text;
strncpy(hud.windowheader,message,80);
for(i = 0;i < 10;i++)
{
sprintf(letter,"%c",'0' + i);
SetButton(&hud.buttons[i],BI_Letter + i,(SDLK_0 + i),letter,NULL,NULL,NULL,NULL,48 + (24 *(i % 6)),56 + (24 *(i / 6)),16,16,1,0);
}
i = 10;
SetButton(&hud.buttons[i],BI_Letter + i,SDLK_PERIOD,".",NULL,NULL,NULL,NULL,48 + (24 *(i % 6)),56 + (24 *(i / 6)),16,16,1,0);
SetButton(&hud.buttons[11],BI_OK,SDLK_RETURN,"Done",NULL,NULL,NULL,NULL,122,240,74,64,1,0);
SetButton(&hud.buttons[12],BI_Prev,SDLK_BACKSPACE," ",buttonarrows[0],buttonarrows[0], buttonarrows[1], buttonarrows[2],100,194,16,16,1,1);
SetButton(&hud.buttons[13],BI_Next,SDLK_SPACE," ",buttonarrows[0],buttonarrows[0], buttonarrows[1], buttonarrows[2],124,194,16,16,1,3);
hud.windowdraw = DrawTextWindow;
hud.windowupdate = UpdateIPWindow;
return &hud.readyreturn;
}
示例7: SetButton
void HintBox::SetHintStrength(void) {
SetButton(IDC_RADIO_NONE, mStrength == HINT_NONE);
SetButton(IDC_RADIO_EMPTY, mStrength == HINT_EMPTY);
SetButton(IDC_RADIO_CONNECTED, mStrength == HINT_CONNECTED);
SetButton(IDC_RADIO_USABLE_ANY, mStrength == HINT_USABLE_ANY);
SetButton(IDC_RADIO_USABLE_SELECTED, mStrength == HINT_USABLE_SELECTED);
}
示例8: SetupMainMenu
void SetupMainMenu()
{
hud.numbuttons = 3;
hud.buttonfocus = 0;
SetButton(&hud.buttons[0],BI_NewGame,-1,"New",buttonsprites[2],buttonsprites[0],buttonsprites[1], buttonsprites[2],4,152,74,64,1,0);
SetButton(&hud.buttons[1],BI_LoadGame,-1,"Load",buttonsprites[0],buttonsprites[0],buttonsprites[1], buttonsprites[2],82,152,74,64,1,0);
SetButton(&hud.buttons[2],BI_Quit,-1,"Quit",buttonsprites[0],buttonsprites[0],buttonsprites[1], buttonsprites[2],160,152,74,64,1,0);
}
示例9: SetButton
BOOL CToolbarHelper::SetDropButton(UINT nBtnCmdID, UINT nMenuID, int nSubMenu, UINT nDefCmdID, char cHotkey)
{
THButton dm = { 0 };
if (m_mapTHButtons.Lookup(nBtnCmdID, dm))
return SetButton(nBtnCmdID, nMenuID, nSubMenu, nDefCmdID, cHotkey, dm.szTip);
else
return SetButton(nBtnCmdID, nMenuID, nSubMenu, nDefCmdID, cHotkey, _T(""));
}
示例10: SetupElementWindow
void SetupElementWindow(int startwin)
{
hud.numbuttons = 3;
hud.buttonfocus = 2;
hud.subwindow = 1;
hud.subwindowinfo = startwin;
SetButton(&hud.buttons[0],BI_CloseWin,-1," ",buttonarrows[0],buttonarrows[0], buttonarrows[1], buttonarrows[2],172,38,16,16,1,5);
SetButton(&hud.buttons[1],BI_Prev,-1," ",buttonarrows[0],buttonarrows[0], buttonarrows[1], buttonarrows[2],38,130,16,16,1,1);
SetButton(&hud.buttons[2],BI_Next,-1," ",buttonarrows[2],buttonarrows[0], buttonarrows[1], buttonarrows[2],186,130,16,16,1,3);
hud.windowdraw = DrawElementWindow;
hud.windowupdate = UpdateElementWindow;
}
示例11: ShioHtsInit
OSErr ShioHtsInit(DialogPtr dialog, VOIDPTR data)
{
#pragma unused(data)
SetButton (dialog, SHIOHTSSTANDINGWAVE, sDialogStandingWave);
SetButton (dialog, SHIOHTSPROGRESSIVEWAVE, !sDialogStandingWave);
Float2EditText (dialog, SHIOHTSSCALEFACTOR, sDialogScaleFactor, 0);
ShowHideDialogItem(dialog, SHIOHTSSCALEFACTOR, false );
ShowHideDialogItem(dialog, SHIOHTSSCALEFACTORLABEL, false);
return 0;
}
示例12: strncpy
int *YesNo(char message[80],void (*option1)(),void (*option2)())
{
hud.numbuttons = 2;
hud.buttonfocus = 0;
hud.subwindow = 1;
hud.readyreturn = -1;
hud.optionrun[0] = option1;
hud.optionrun[1] = option2;
strncpy(hud.windowheader,message,80);
SetButton(&hud.buttons[0],BI_Yes, -1,"Yes",buttonsprites[2],buttonsprites[0],buttonsprites[1], buttonsprites[2],44,90,74,64,1,0);
SetButton(&hud.buttons[1],BI_No, -1,"No",buttonsprites[2],buttonsprites[0],buttonsprites[1], buttonsprites[2],122,90,74,64,1,0);
hud.windowdraw = DrawYesNoWindow;
hud.windowupdate = UpdateYesNoWindow;
return &hud.readyreturn;
}
示例13: MouseButtonReleaseEvent
bool ChartXY::MouseButtonReleaseEvent(const vtkContextMouseEvent & mouse)
{
// single selection, equivalent with picking events in RenderViewStrategy subclasses
bool singleSelectionEvent = !m_mouseMoved && (mouse.GetButton() == vtkContextMouseEvent::LEFT_BUTTON);
if (!singleSelectionEvent)
{
return vtkChartXY::MouseButtonReleaseEvent(mouse);
}
// clear previous selection first (as for RenderViewStrategy)
for (vtkIdType i = 0; i < this->GetNumberOfPlots(); ++i)
{
this->GetPlot(i)->SetSelection(nullptr);
}
auto staticClick = mouse;
staticClick.SetButton(this->Actions.Select());
auto retVal = vtkChartXY::MouseButtonReleaseEvent(staticClick);
this->InvokeEvent(PlotSelectedEvent, reinterpret_cast<void *>(selectedPlot()));
return retVal;
}
示例14: Window_
int Window_( lua_State* L )
{
UIWindow* window = new UIWindow;
SetName(L, window);
SetTopLeftWidthHeight(L, window);
SetTooltip(L, window);
SetAnim(L, window, UIPanel::NORMAL_ANIM_, "normalAnim");
SetAnim(L, window, UIPanel::DISABLED_ANIM_, "disabledAnim");
SetTextUserData(L, window);
AddWidget(L, window);
// 配置关闭按钮
if (util::HasField(L, "closeBtn"))
{
lua_pushstring(L, "closeBtn");
lua_gettable(L, -2);
if (lua_istable(L, -1))
SetButton(L, window->GetCloseButton());
lua_pop(L, 1);
}
SetAlpha(L, window);
lua_pushlightuserdata(L, window);
return 1;
}
示例15: SetDefault
void __fastcall TSmallTypeForm::FormShow(TObject *Sender)
{
SetDefault();
ListView1->Items->Clear();
if (rights==0)
SetButton(0,0,0,0,0,0,1,1);
Screen->Cursor= crHourGlass;
if (!prtform)
{
try
{
prtform= new TTypePrtForm(Application);
}
catch(...)
{
prtform=NULL;
}
}
Screen->Cursor=crDefault;
smtype = new TStringList;
strsql =AnsiString("select * from dicmiddletype order by mt_code ");
if (DoQuery(dm1->Query1,strsql))
{
if (!dm1->Query1->IsEmpty())
{
cbmtype->Items->Clear();
while (!dm1->Query1->Eof)
{
smtype->Add(dm1->Query1->FieldByName("mt_code")->AsString);
cbmtype->Items->Add(dm1->Query1->FieldByName("mt_name")->AsString);
dm1->Query1->Next();
}
}
}
}