本文整理汇总了C++中SetBool函数的典型用法代码示例。如果您正苦于以下问题:C++ SetBool函数的具体用法?C++ SetBool怎么用?C++ SetBool使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetBool函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetBool
/*********************************************************************\
Function name : CCustomSubDialog::InitValues
Description :
Created at : 27.03.02, @ 12:07:33
Created by : Thomas Kunert
Modified by :
\*********************************************************************/
Bool CCustomSubDialog::InitValues(void)
{
Int32 lID = FIRST_CUSTOM_ELEMENT_ID;
Int32 i;
CCustomElements* pElement = g_pCustomElements->GetItem(m_pElement->m_lElement);
if (!pElement) return true;
if (!m_pElement->m_pbcGUI) return true;
BaseContainer* pBC = &m_pElement->m_pbcGUI[m_pElement->m_lElement];
SetBool(IDC_CUSTOM_OPEN_CLOSE, pElement->m_bIsOpen);
for (i = 0; m_pProp && m_pProp[i].type != CUSTOMTYPE_END; i++, lID++)
{
CustomProperty* pProp = &pElement->m_pProp[i];
if (pProp->type == CUSTOMTYPE_FLAG) SetBool(lID, pBC, pProp->id);
else if (pProp->type == CUSTOMTYPE_LONG) SetInt32(lID, pBC, pProp->id);
else if (pProp->type == CUSTOMTYPE_REAL) SetFloat(lID, pBC, pProp->id);
else if (pProp->type == CUSTOMTYPE_STRING) SetString(lID, pBC, pProp->id);
else if (pProp->type == CUSTOMTYPE_VECTOR)
{
Vector v = pBC->GetVector(pProp->id);
SetFloat(lID++,v.x);
SetFloat(lID++,v.y);
SetFloat(lID,v.z);
}
}
return true;
}
示例2: switch
/////////////////////////////////////////////////////////
// Resets a value with a string, preserving current type
void VariableData::ResetWith(wxString value) {
switch (type) {
case VARDATA_INT: {
long temp = 0;
value.ToLong(&temp);
SetInt(temp);
break;
}
case VARDATA_FLOAT: {
double temp = 0;
value.ToDouble(&temp);
SetFloat(temp);
break;
}
case VARDATA_BOOL:
if (value == _T("1")) SetBool(true);
else SetBool(false);
break;
case VARDATA_COLOUR: {
long r=0,g=0,b=0;
value.Mid(1,2).ToLong(&r,16);
value.Mid(3,2).ToLong(&g,16);
value.Mid(5,2).ToLong(&b,16);
SetColour(wxColour(r,g,b));
break;
}
default:
SetText(value);
break;
}
}
示例3: SetBool
void
QvisLegendAttributesInterface::orientationChanged(int orientation)
{
SetBool(LEGEND_ORIENTATION0, (orientation==2 || orientation==3) );
SetBool(LEGEND_ORIENTATION1, (orientation==1 || orientation==3) );
SetUpdate(false);
Apply();
}
示例4: prEvent_IsRest
int prEvent_IsRest(struct VMGlobals *g, int numArgsPushed)
{
PyrSlot *dictslots = slotRawObject(g->sp)->slots;
PyrSlot *arraySlot = dictslots + ivxIdentDict_array;
if (isKindOfSlot(arraySlot, class_array)) {
PyrSlot key, typeSlot;
static PyrSymbol *s_type = getsym("type");
static PyrSymbol *s_rest = getsym("rest");
PyrSymbol *typeSym;
// test 'this[\type] == \rest' first
SetSymbol(&key, s_type);
identDict_lookup(slotRawObject(g->sp), &key, calcHash(&key), &typeSlot);
if(!slotSymbolVal(&typeSlot, &typeSym) && typeSym == s_rest) {
SetBool(g->sp, 1);
return errNone;
} else {
PyrObject *array = slotRawObject(arraySlot);
PyrSymbol *slotSym;
static PyrSymbol *s_empty = getsym("");
static PyrSymbol *s_r = getsym("r");
static PyrClass *class_rest = getsym("Rest")->u.classobj;
static PyrClass *class_metarest = getsym("Meta_Rest")->u.classobj;
PyrSlot *slot;
int32 size = array->size;
int32 i;
slot = array->slots + 1; // scan only the odd items
for (i = 1; i < size; i += 2, slot += 2) {
if (isKindOfSlot(slot, class_rest)
|| isKindOfSlot(slot, class_metarest)
) {
SetBool(g->sp, 1);
return errNone;
} else if(!slotSymbolVal(slot, &slotSym)) {
if(slotSym == s_empty
|| slotSym == s_r
|| slotSym == s_rest
) {
SetBool(g->sp, 1);
return errNone;
}
} // why no 'else'?
// slotSymbolVal nonzero return = not a symbol;
// non-symbols don't indicate rests, so, ignore them.
}
}
} else {
return errWrongType;
}
SetBool(g->sp, 0);
return errNone;
}
示例5: SetNumber
FormLayout::FormLayout()
{
SetNumber("Form.Width", 400);
SetNumber("Form.Height", 300);
SetBool("Form.MaximizeBox", false);
SetBool("Form.MinimizeBox", false);
SetBool("Form.Sizeable", false);
SetBool("Form.ToolWindow", false);
Set("Form.Name", t_("Noname"));
SetPageRect( Rect(Point(10, 10), Size(400, 300)) );
}
示例6: _Init
/*********************************************************************\
Function name : CArrowSettings::SetData
Description :
Created at : 12.08.01, @ 21:55:29
Created by : Thomas Kunert
Modified by :
\*********************************************************************/
void CArrowSettings::SetData()
{
_Init();
SetBool(IDS_ARROW_SMALL_CHK, m_pArrow->m_lArrowType > 4);
Int32 l = m_pArrow->m_lArrowType;
if (l > 4) l -= 4;
SetInt32(IDS_ARROW_TYPE_COMBO, l - 1);
SetBool(IDC_IS_POPUP_CHK, m_pArrow->m_bIsPopupButton);
Enable(IDS_ARROW_SMALL_CHK, !m_pArrow->m_bIsPopupButton);
Enable(IDS_ARROW_TYPE_COMBO, !m_pArrow->m_bIsPopupButton);
Enable(IDC_ARROW_CHILD_ITEMS, m_pArrow->m_bIsPopupButton);
m_pArrow->m_Children.FillEditBox(m_pSettingsDialog, IDC_ARROW_CHILD_ITEMS);
}
示例7: SetBool
void CXTPPropertyGridItemBool::OnBeforeInsert()
{
if (m_pBindBool && *m_pBindBool != m_bValue)
{
SetBool(*m_pBindBool);
}
}
示例8: switch
/*************************************
* operator =
*************************************/
SHVDataVariant& SHVDataVariantImpl::operator=(const SHVDataVariant& val)
{
switch (val.GetDataType())
{
case SHVDataVariant::TypeInt:
SetInt(val.AsInt());
break;
case SHVDataVariant::TypeInt64:
SetInt64(val.AsInt64());
break;
case SHVDataVariant::TypeBool:
SetBool(val.AsBool());
break;
case SHVDataVariant::TypeDouble:
SetDouble(val.AsDouble());
break;
case SHVDataVariant::TypeString:
SetString(val.AsString());
break;
case SHVDataVariant::TypeTime:
SetTime(val.AsTime());
break;
}
return *this;
}
示例9: switch
PListValue& PListValue::operator =(const PListValue& rhs)
{
switch (rhs.type_)
{
case PLVT_NONE:
Reset();
break;
case PLVT_INT:
SetInt(rhs.int_);
break;
case PLVT_BOOL:
SetBool(rhs.bool_);
break;
case PLVT_FLOAT:
SetFloat(rhs.float_);
break;
case PLVT_STRING:
SetString(*rhs.string_);
break;
case PLVT_VALUEMAP:
SetValueMap(*rhs.valueMap_);
break;
case PLVT_VALUEVECTOR:
SetValueVector(*rhs.valueVector_);
break;
}
return *this;
}
示例10: GetBool
void ApplinkDialog::Timer(const BaseContainer &msg)
{
Bool b;
GetBool(IDC_CHK_PROMPT, b);
if(b)
{
Filename fn;
fn.SetDirectory(gPreferences.GetString(IDC_EXCH_FOLDER));
fn.SetFile("export.txt");
if(GeFExist(fn))
{
GePrint("File exists!");
SetTimer(0);
if(GeOutString("To import a new object?", GEMB_OKCANCEL) == GEMB_R_OK)
{
GePrint("Start import!");
BaseDocument* doc = GetActiveDocument();
ApplinkImporter* importer = NewObjClear(ApplinkImporter);
importer->Execute(doc, &gPreferences);
SetTimer(1000);
}
else
{
SetBool(IDC_CHK_PROMPT, false);
}
}
}
}
示例11: avtAnnotationColleague
avtLegendAttributesColleague::avtLegendAttributesColleague(
VisWindowColleagueProxy &m) : avtAnnotationColleague(m), atts()
{
// Populate atts with some legend defaults.
SetBool(atts, LEGEND_MANAGE_POSITION, true);
SetBool(atts, LEGEND_DRAW_BOX, false);
SetBool(atts, LEGEND_DRAW_LABELS, false);
SetBool(atts, LEGEND_ORIENTATION0, false);
SetBool(atts, LEGEND_ORIENTATION1, false);
SetBool(atts, LEGEND_DRAW_TITLE, true);
SetBool(atts, LEGEND_DRAW_MINMAX, true);
SetBool(atts, LEGEND_CONTROL_TICKS, true);
SetBool(atts, LEGEND_MINMAX_INCLUSIVE, true);
SetBool(atts, LEGEND_DRAW_VALUES, true);
// Set the format string for the legend into the text.
stringVector text;
text.push_back("%# -9.4g");
atts.SetText(text);
// Set the default position.
const double defaultPosition[2] = {0.05, 0.9};
atts.SetPosition(defaultPosition);
// Set the default scale.
const double defaultScale[2] = {1.,1.};
atts.SetPosition2(defaultScale);
// Set the default font height.
atts.SetDoubleAttribute1(0.015);
// Set the default bounding box color.
atts.SetColor1(ColorAttribute(0,0,0,50));
// Set the default font properties.
atts.SetFontFamily(AnnotationObject::Arial);
atts.SetFontBold(false);
atts.SetFontItalic(false);
atts.SetFontShadow(false);
// Set the default number of ticks
atts.SetIntAttribute2(5);
// Set the default legend type to variable
atts.SetIntAttribute3(0);
}
示例12: ScIDE_Connected
int ScIDE_Connected(struct VMGlobals *g, int numArgsPushed)
{
PyrSlot * returnSlot = g->sp - numArgsPushed + 1;
SetBool(returnSlot, gIpcClient != 0);
return errNone;
}
示例13: SetBool
Bool CSearchDialog::InitValues()
{
if (!GeDialog::InitValues()) return false;
SetBool(IDC_SEARCH_REG_EXPR_CHK, m_bRegExpr);
SetString(IDC_SEARCH_EDIT, m_strText);
return true;
}
示例14: lock
bool CSettingsManager::ToggleBool(const std::string &id)
{
CSharedLock lock(m_settingsCritical);
CSetting *setting = GetSetting(id);
if (setting == NULL || setting->GetType() != SettingTypeBool)
return false;
return SetBool(id, !((CSettingBool*)setting)->GetValue());
}
示例15: InitValues
Bool InitValues()
{
// Initialize the force items.
FreeChildren(CMB_FORCE);
AddForceCycleElement(ID_SPRING);
AddForceCycleElement(ID_CONNECTOR);
AddForceCycleElement(ID_MOTOR);
SetInt32(CMB_FORCE, ID_CONNECTOR);
SetInt32(CMB_TYPE, -1);
SetInt32(CMB_MODE, CMB_MODE_ALL);
SetInt32(EDT_MAXCONN, 0, 0, 20, 1, false, 0, LIMIT<Int32>::MAX);
SetFloat(EDT_RADIUS, (Float) 0, 0, 500, 1.0, FORMAT_METER, 0, MAXVALUE_FLOAT, false, false);
SetBool(CHK_ADDDYNAMICS, false);
SetBool(CHK_COMPOUND, false);
SetBool(CHK_CLOSED, false);
UpdateGadgets(true);
return super::InitValues();
}