本文整理匯總了C++中Enable函數的典型用法代碼示例。如果您正苦於以下問題:C++ Enable函數的具體用法?C++ Enable怎麽用?C++ Enable使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Enable函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: GeGetPluginPath
Bool ApplinkDialog::InitValues(void)
{
if (!GeDialog::InitValues()) return FALSE;
filenamePrefs = GeGetPluginPath()+ "preference.ini";
dirty = FALSE;
AutoAlloc<HyperFile> hyperfilePrefs;
if(!GeFExist(filenamePrefs, FALSE))
{
if (!hyperfilePrefs->Open(filenamePrefs.GetString(), GE_WRITE, FILE_NODIALOG)) return FALSE;
gPreferences.SetString(IDC_TMP_FOLDER, "");
Filename path;
#ifdef _WIN32 || _WIN64
path = GeGetC4DPath(C4D_PATH_MYDOCUMENTS);
#elif __APPLE__
path = GeGetC4DPath(C4D_PATH_HOME);
#endif
Filename exFolder = path + "3D-CoatV3" + "Exchange";
if(GeFExist(exFolder, TRUE))
{
gPreferences.SetString(IDC_EXCH_FOLDER, exFolder.GetString());
}
else
{
#ifdef _WIN32 || _WIN64
GePrint(String("Folder ..\\MyDocuments\\3D-CoatV3\\Exchange not found!"));
#elif __APPLE__
GePrint(String("Folder ../Users/admin/3D-CoatV3/Exchange not found!"));
#endif
gPreferences.SetString(IDC_EXCH_FOLDER, "");
}
gPreferences.SetLong(IDC_COMBO_MAP_TYPE, 0);
gPreferences.SetBool(IDC_CHK_EXP_MAT, TRUE);
gPreferences.SetBool(IDC_CHK_EXP_UV, TRUE);
gPreferences.SetBool(IDC_CHK_SKIP_IMP_DIALOG, FALSE);
gPreferences.SetBool(IDC_CHK_SKIP_EXP_DIALOG, FALSE);
gPreferences.SetBool(IDC_CHK_IMP_MAT, TRUE);
gPreferences.SetLong(IDC_COMBO_MAP_IMPORT, 0);
gPreferences.SetBool(IDC_CHK_IMP_UV, TRUE);
gPreferences.SetBool(IDC_CHK_REPLACE, TRUE);
gPreferences.SetBool(IDC_CHK_PROMPT, FALSE);
gPreferences.SetString(IDC_COAT_EXE_PATH, "");
gPreferences.SetBool(IDC_CHK_COAT_START, FALSE);
hyperfilePrefs->WriteContainer(gPreferences);
hyperfilePrefs->Close();
}
if(!hyperfilePrefs->Open(filenamePrefs.GetString(), GE_READ, FILE_NODIALOG)) return FALSE;
hyperfilePrefs->ReadContainer(&gPreferences, TRUE);
hyperfilePrefs->Close();
SetString(IDC_TMP_FOLDER, gPreferences.GetString(IDC_TMP_FOLDER));
SetString(IDC_EXCH_FOLDER, gPreferences.GetString(IDC_EXCH_FOLDER));
SetLong(IDC_COMBO_MAP_TYPE, gPreferences.GetLong(IDC_COMBO_MAP_TYPE));
SetBool(IDC_CHK_EXP_MAT, gPreferences.GetBool(IDC_CHK_EXP_MAT));
SetBool(IDC_CHK_EXP_UV, gPreferences.GetBool(IDC_CHK_EXP_UV));
SetBool(IDC_CHK_SKIP_IMP_DIALOG, gPreferences.GetBool(IDC_CHK_SKIP_IMP_DIALOG));
SetBool(IDC_CHK_SKIP_EXP_DIALOG, gPreferences.GetBool(IDC_CHK_SKIP_EXP_DIALOG));
SetBool(IDC_CHK_IMP_MAT, gPreferences.GetBool(IDC_CHK_IMP_MAT));
SetLong(IDC_COMBO_MAP_IMPORT, gPreferences.GetLong(IDC_COMBO_MAP_IMPORT));
SetBool(IDC_CHK_IMP_UV, gPreferences.GetBool(IDC_CHK_IMP_UV));
SetBool(IDC_CHK_REPLACE, gPreferences.GetBool(IDC_CHK_REPLACE));
SetBool(IDC_CHK_PROMPT, gPreferences.GetBool(IDC_CHK_PROMPT));
SetString(IDC_COAT_EXE_PATH, gPreferences.GetString(IDC_COAT_EXE_PATH));
SetBool(IDC_CHK_COAT_START, gPreferences.GetBool(IDC_CHK_COAT_START));
#ifdef __APPLE__
//------------ temp
Enable(IDC_CHK_COAT_START, false);
Enable(IDC_COAT_EXE_PATH, false);
//-------------
// SetString(IDS_STATIC12, "Folder ../Users/user/3D-CoatV3/Exchange not found!");
#endif
SetTimer(1000);
return TRUE;
}
示例2: Enable
Updatable::Updatable()
{
Enable();
}
示例3: UpdateGadgets
void UpdateGadgets(Bool relevants=false)
{
Int32 mode;
Bool add_dynamics;
GetBool(CHK_ADDDYNAMICS, add_dynamics);
GetInt32(CMB_MODE, mode);
BaseDocument* doc = GetActiveDocument();
BaseObject* op = doc ? doc->GetActiveObject() : nullptr;
Enable(EDT_MAXCONN, mode != CMB_MODE_CHAIN);
Enable(EDT_RADIUS, mode != CMB_MODE_CHAIN);
Enable(CHK_CLOSED, mode == CMB_MODE_CHAIN);
Enable(CHK_COMPOUND, add_dynamics);
// Need at least two child objects on the active object.
Bool execEnabled = op != nullptr && op->GetDown() != nullptr
&& op->GetDown()->GetNext() != nullptr;
Enable(BTN_EXECUTE, execEnabled);
if (relevants)
{
FreeChildren(CMB_TYPE);
Int32 pluginid;
GetInt32(CMB_FORCE, pluginid);
do {
BaseObject* op = BaseObject::Alloc(pluginid);
if (!op) break;
AutoFree<BaseObject> free(op);
AutoAlloc<Description> desc;
if (!op->GetDescription(desc, DESCFLAGS_DESC_0)) break;
BaseContainer temp;
AutoAlloc<AtomArray> arr;
const BaseContainer* param = desc->GetParameter(FORCE_TYPE, temp, arr);
if (!param) break;
const BaseContainer* cycle = param->GetContainerInstance(DESC_CYCLE);
if (!cycle) break;
const BaseContainer* icons = param->GetContainerInstance(DESC_CYCLEICONS);
Int32 i = 0;
Int32 last_id = -1;
while (true) {
Int32 id = cycle->GetIndexId(i++);
if (id == NOTOK) break;
Int32 icon = icons ? icons->GetInt32(id) : -1;
String name = cycle->GetString(id);
if (name.Content()) {
if (icon > 0) name += "&i" + String::IntToString(icon);
if (last_id < 0) last_id = id;
AddChild(CMB_TYPE, id, name);
}
}
SetInt32(CMB_TYPE, last_id);
} while (0);
LayoutChanged(CMB_TYPE);
}
}
示例4: Enable
/*
================
idTrigger_Hurt::Spawn
Damages activator
Can be turned on or off by using.
================
*/
void idTrigger_Hurt::Spawn( void ) {
spawnArgs.GetBool( "on", "1", on );
spawnArgs.GetFloat( "delay", "1.0", delay );
nextTime = gameLocal.time;
Enable();
}
示例5: Enable
void Console::ToggleConsole()
{
Enable( !IsEnabled() );
}
示例6: Enable
~CFlowNode_MsgReceiver()
{
Enable(false); // This unregisters the listener
}
示例7: Enable
void wxCheckedListCtrl::EnableAll(bool enable)
{
for (int i = 0; i < GetItemCount(); i++)
Enable(i, enable);
}
示例8: Disable
void Disable()
{
Enable( false );
}
示例9: Enable
void CAI_ScriptConditions::InputEnable( inputdata_t &inputdata )
{
m_bLeaveAsleep = false;
Enable();
}
示例10: switch
void Scene_Shop::SetMode(int nmode) {
mode = nmode;
help_window->SetText("");
// Central panel
switch (mode) {
case BuySellLeave:
case BuySellLeave2:
empty_window->SetVisible(true);
Enable(sell_window.get(), false);
break;
case Sell:
empty_window->SetVisible(false);
Enable(sell_window.get(), true);
break;
case Buy:
case BuyHowMany:
case SellHowMany:
case Bought:
case Sold:
empty_window->SetVisible(false);
Enable(sell_window.get(), false);
break;
}
// Right-hand panels
switch (mode) {
case BuySellLeave:
case BuySellLeave2:
case Sell:
party_window->SetVisible(false);
status_window->SetVisible(false);
gold_window->SetVisible(false);
break;
case Buy:
case BuyHowMany:
case SellHowMany:
case Bought:
case Sold:
party_window->SetVisible(true);
status_window->SetVisible(true);
gold_window->SetVisible(true);
break;
}
// Left-hand panels
switch (mode) {
case BuySellLeave:
case BuySellLeave2:
case Sell:
Enable(buy_window.get(), false);
Enable(number_window.get(), false);
empty_window2->SetVisible(false);
break;
case Buy:
buy_window->Refresh();
Enable(buy_window.get(), true);
Enable(number_window.get(), false);
empty_window2->SetVisible(false);
break;
case BuyHowMany:
case SellHowMany:
number_window.get()->Refresh();
Enable(buy_window.get(), false);
Enable(number_window.get(), true);
break;
case Bought:
case Sold:
Enable(buy_window.get(), false);
Enable(number_window.get(), false);
empty_window2->SetVisible(true);
timer = DEFAULT_FPS;
break;
}
shop_window->SetMode(mode);
}
示例11: OnEnableClicked
static void
OnEnableClicked(gcc_unused WndButton &Sender)
{
Enable();
}
示例12: Enable
//-----------------------------------------------------------------------------
// Purpose: Input hander that starts the spawner
//-----------------------------------------------------------------------------
void CMomentaryRotButton::InputEnable( inputdata_t &inputdata )
{
Enable();
}
示例13: SetTopParent
bool wxGenericProgressDialog::Create( const wxString& title,
const wxString& message,
int maximum,
wxWindow *parent,
int style )
{
SetTopParent(parent);
m_parentTop = wxGetTopLevelParent(parent);
m_pdStyle = style;
wxWindow* const
realParent = GetParentForModalDialog(parent, GetWindowStyle());
if (!wxDialog::Create(realParent, wxID_ANY, title))
return false;
SetMaximum(maximum);
// We need a running event loop in order to update the dialog and be able
// to process clicks on its buttons, so ensure that there is one running
// even if this means we have to start it ourselves (this happens most
// commonly during the program initialization, e.g. for the progress
// dialogs shown from overridden wxApp::OnInit()).
if ( !wxEventLoopBase::GetActive() )
{
m_tempEventLoop = new wxEventLoop;
wxEventLoop::SetActive(m_tempEventLoop);
}
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
// we have to remove the "Close" button from the title bar then as it is
// confusing to have it - it doesn't work anyhow
//
// FIXME: should probably have a (extended?) window style for this
if ( !HasPDFlag(wxPD_CAN_ABORT) )
{
EnableCloseButton(false);
}
#endif // wxMSW
#if defined(__SMARTPHONE__)
SetLeftMenu();
#endif
m_state = HasPDFlag(wxPD_CAN_ABORT) ? Continue : Uncancelable;
// top-level sizerTop
wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);
m_msg = new wxStaticText(this, wxID_ANY, message);
sizerTop->Add(m_msg, 0, wxLEFT | wxTOP, 2*LAYOUT_MARGIN);
int gauge_style = wxGA_HORIZONTAL;
if ( style & wxPD_SMOOTH )
gauge_style |= wxGA_SMOOTH;
#ifdef __WXMSW__
maximum /= m_factor;
#endif
m_gauge = new wxGauge
(
this,
wxID_ANY,
maximum,
wxDefaultPosition,
// make the progress bar sufficiently long
wxSize(wxMin(wxGetClientDisplayRect().width/3, 300), -1),
gauge_style
);
sizerTop->Add(m_gauge, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 2*LAYOUT_MARGIN);
m_gauge->SetValue(0);
// create the estimated/remaining/total time zones if requested
m_elapsed =
m_estimated =
m_remaining = NULL;
// also count how many labels we really have
size_t nTimeLabels = 0;
wxSizer * const sizerLabels = new wxFlexGridSizer(2);
if ( style & wxPD_ELAPSED_TIME )
{
nTimeLabels++;
m_elapsed = CreateLabel(GetElapsedLabel(), sizerLabels);
}
if ( style & wxPD_ESTIMATED_TIME )
{
nTimeLabels++;
m_estimated = CreateLabel(GetEstimatedLabel(), sizerLabels);
}
if ( style & wxPD_REMAINING_TIME )
//.........這裏部分代碼省略.........
示例14: OperThreadWin
NCDialog::NCDialog( bool asChild, int nId, NCDialogParent* parent, const unicode_t* headerText, ButtonDataNode* blist ) //, unsigned bcolor, unsigned fcolor)
: OperThreadWin( asChild ? Win::WT_CHILD : WT_MAIN /*WT_POPUP*/, 0, nId, parent ), //, &crect(0,0,300,100)),
_shadow( parent ),
// _fcolor(fcolor),
// _bcolor(bcolor),
_header( nId, this, headerText ),
_lo( 9, 9 ),
_buttonLo( 3, 16 ),
_headerLo( 3, 3 ),
_parentLo( 3, 3 ),
enterCmd( 0 ),
m_nId( nId )
{
Enable();
_lo.SetLineGrowth( 4 );
_lo.SetColGrowth( 4 );
_lo.ColSet( 0, 2 );
_lo.ColSet( 1, 10 );
_lo.ColSet( 2, 3 );
_lo.ColSet( 3, 5 );
_lo.ColSet( 5, 5 );
_lo.ColSet( 6, 3 );
_lo.ColSet( 7, 10 );
_lo.ColSet( 8, 2 );
_lo.LineSet( 0, 2 );
_lo.LineSet( 1, 10 );
_lo.LineSet( 2, 3 );
_lo.LineSet( 3, 3 );
//_lo.LineSet(5, 5);
_lo.LineSet( 6, 3 );
_lo.LineSet( 7, 5 );
_lo.LineSet( 8, 2 );
_lo.ColSet( 4, 16, 100000 );
_lo.LineSet( 4, 16, 100000 );
_lo.AddRect( &_borderRect, 0, 0, 8, 8 );
_lo.AddRect( &_frameRect, 2, 2, 6, 6 );
_headerLo.ColSet( 0, 1, 1000 );
_headerLo.ColSet( 2, 1, 1000 );
_headerLo.LineSet( 0, 2 );
_headerLo.LineSet( 2, 2 );
_headerLo.AddWin( &_header, 1, 1 );
_lo.AddLayout( &_headerLo, 1, 4 );
_buttonLo.ColSet( 0, 10, 1000 );
_buttonLo.ColSet( 15, 10, 1000 );
_buttonLo.LineSet( 0, 2 );
_buttonLo.LineSet( 2, 2 );
_parentLo.ColSet( 0, 20, 1000 );
_parentLo.ColSet( 2, 20, 1000 );
_parentLo.LineSet( 0, 20, 1000 );
_parentLo.LineSet( 2, 20, 1000 );
_parentLo.AddWin( this, 1, 1 );
_parentLo.SetLineGrowth( 0 );
_parentLo.SetLineGrowth( 2 );
_parentLo.SetColGrowth( 0 );
_parentLo.SetColGrowth( 2 );
if ( blist )
{
int n = 0;
int minW = 0;
for ( ; blist->utf8text && n < 7; blist++, n++ )
{
clPtr<Button> p = new Button( 0, this, utf8_to_unicode( _LT( carray_cat<char>( "DB>", blist->utf8text ).data(), blist->utf8text ) ).data(), blist->cmd );
p->Show();
p->Enable();
if ( n > 0 )
{
_buttonLo.ColSet( n * 2, 5 );
}
_buttonLo.AddWin( p.ptr(), 1, n * 2 + 1 );
if ( minW < p->GetLSize().x.minimal )
{
minW = p->GetLSize().x.minimal;
}
_bList.append( p );
//break; ???
}
//.........這裏部分代碼省略.........
示例15: glEnable
GL_APICALL void GL_APIENTRY glEnable (GLenum cap)
{
CONTEXT_EXEC(Enable(cap));
}