本文整理匯總了C++中GetChildren函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetChildren函數的具體用法?C++ GetChildren怎麽用?C++ GetChildren使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetChildren函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: HidePages
void wxWizardSizer::HidePages()
{
for ( wxSizerItemList::compatibility_iterator node = GetChildren().GetFirst();
node;
node = node->GetNext() )
{
wxSizerItem * const item = node->GetData();
if ( item->IsWindow() )
item->GetWindow()->wxWindowBase::Show(false);
}
}
示例2: HandleAdd
void Bin::HandleAdd( const Widget::Ptr& child ) {
Container::HandleAdd( child );
if( GetChildren().size() > 1 ) {
#ifdef SFGUI_DEBUG
std::cerr << "SFGUI warning: Only one widget can be added to a Bin." << std::endl;
#endif
Remove( child );
}
}
示例3: GetChildren
Task::TaskSet * CTaskModel::GetAllChildren(Task::TaskSet *pKids)
{
int start = pKids->GetCount();
pKids = GetChildren(pKids);
int end = pKids->GetCount();
for(int i = start; i < end; i++)
{
(*pKids)[i].GetAllChildren(pKids);
}
return pKids;
}
示例4: sceneObjects
Array<SceneObject*> Scene::GetWholeSceneObjects() {
Array<SceneObject*> sceneObjects(GetChildren());
for (int i = 0; i < sceneObjects.GetSize(); ++i) {
Array<SceneObject*> children(sceneObjects[i]->GetChildren());
for (auto it = children.Begin(); it != children.End(); ++it) {
sceneObjects.PushBack(*it);
}
}
return sceneObjects;
}
示例5: GetClientSize
void CategoryList::ReCreateScrollBars()
{
int clientHeight = GetClientSize().GetHeight();
int maxY = clientHeight;
for(wxWindowList::Node * node = GetChildren().GetFirst(); node; node = node->GetNext())
{
maxY = wxMax(maxY, node->GetData()->GetPosition().y+node->GetData()->GetSize().GetHeight());
}
maxY += (maxY <= clientHeight ? 0 : 5);
SetScrollbar(wxVERTICAL, 0, clientHeight, maxY);
}
示例6: ComputeStudyCounters
static void ComputeStudyCounters(DicomMap& result,
ServerContext& context,
const std::string& study,
const DicomMap& query)
{
ServerIndex& index = context.GetIndex();
std::list<std::string> series;
index.GetChildren(series, study);
if (query.HasTag(DICOM_TAG_NUMBER_OF_STUDY_RELATED_SERIES))
{
result.SetValue(DICOM_TAG_NUMBER_OF_STUDY_RELATED_SERIES,
boost::lexical_cast<std::string>(series.size()), false);
}
if (query.HasTag(DICOM_TAG_MODALITIES_IN_STUDY))
{
std::set<std::string> values;
ExtractTagFromMainDicomTags(values, index, DICOM_TAG_MODALITY, series, ResourceType_Series);
StoreSetOfStrings(result, DICOM_TAG_MODALITIES_IN_STUDY, values);
}
if (!query.HasTag(DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES) &&
!query.HasTag(DICOM_TAG_SOP_CLASSES_IN_STUDY))
{
return;
}
std::list<std::string> instances;
GetChildren(instances, index, series);
if (query.HasTag(DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES))
{
result.SetValue(DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES,
boost::lexical_cast<std::string>(instances.size()), false);
}
if (query.HasTag(DICOM_TAG_SOP_CLASSES_IN_STUDY))
{
if (Configuration::GetGlobalBoolParameter("AllowFindSopClassesInStudy", false))
{
std::set<std::string> values;
ExtractTagFromInstances(values, context, DICOM_TAG_SOP_CLASS_UID, instances);
StoreSetOfStrings(result, DICOM_TAG_SOP_CLASSES_IN_STUDY, values);
}
else
{
result.SetValue(DICOM_TAG_SOP_CLASSES_IN_STUDY, "", false);
LOG(WARNING) << "The handling of \"SOP Classes in Study\" (0008,0062) "
<< "in C-FIND requests is disabled";
}
}
}
示例7: GetChildren
// Sets the main checkbox status, and enables/disables all child controls
// bound to the StaticBox accordingly.
void CheckedStaticBox::SetValue(bool val)
{
wxWindowList &list = GetChildren();
for (wxWindowList::iterator iter = list.begin(); iter != list.end(); ++iter) {
wxWindow *current = *iter;
if (current != &ThisToggle)
current->Enable(val);
}
ThisToggle.SetValue(val);
}
示例8: LOG_TRACE
void SeqScanPlan::SetParameterValues(std::vector<common::Value *> *values) {
LOG_TRACE("Setting parameter values in Sequential Scan");
auto predicate = predicate_with_params_->Copy();
expression::ExpressionUtil::ConvertParameterExpressions(
predicate, values, GetTable()->GetSchema());
SetPredicate(predicate);
for (auto &child_plan : GetChildren()) {
child_plan->SetParameterValues(values);
}
}
示例9: vUpdateBeforeChildren
void
CGameObject::UpdateAndDraw( unsigned long in_Time )
{
vUpdateBeforeChildren( in_Time );
std::vector< CGameObject* >& rChildren = GetChildren();
for( std::vector< CGameObject* >::iterator It = rChildren.begin(); It!=rChildren.end(); ++It )
{
(*It)->UpdateAndDraw( in_Time );
}
vUpdateAfterChildren();
}
示例10: while
bool wxRibbonPanel::HideExpanded()
{
if(m_expanded_dummy == NULL)
{
if(m_expanded_panel)
{
return m_expanded_panel->HideExpanded();
}
else
{
return false;
}
}
// Move children back to original panel
// NB: Children iterators not used as behaviour is not well defined
// when iterating over a container which is being emptied
while(!GetChildren().IsEmpty())
{
wxWindow *child = GetChildren().GetFirst()->GetData();
child->Reparent(m_expanded_dummy);
child->Hide();
}
// Move sizer back
if(GetSizer())
{
wxSizer* sizer = GetSizer();
SetSizer(NULL, false);
m_expanded_dummy->SetSizer(sizer);
}
m_expanded_dummy->m_expanded_panel = NULL;
m_expanded_dummy->Realize();
m_expanded_dummy->Refresh();
wxWindow *parent = GetParent();
Destroy();
parent->Destroy();
return true;
}
示例11: SetLayerId
void CControl::SetLayerId( size_t layerid )
{
m_uLayerID = layerid;
for ( auto child : GetChildren() )
{
CControl* pChild = ( CControl*) child;
if ( pChild )
{
pChild->SetLayerId( m_uLayerID + 1 );
}
}
}
示例12: GetChildren
std::string SEXPR::AsString( size_t aLevel )
{
std::string result;
if( IsList() )
{
if( aLevel != 0 )
{
result = "\n";
}
result.append( aLevel* 4, ' ' );
aLevel++;
result += "(";
SEXPR_VECTOR const* list = GetChildren();
for( std::vector<SEXPR *>::const_iterator it = list->begin(); it != list->end(); ++it )
{
result += (*it)->AsString( aLevel );
if( it != list->end() - 1 )
{
result += " ";
}
}
result += ")";
aLevel--;
}
else if( IsString() )
{
result += "\"" + GetString() + "\"";
}
else if( IsSymbol() )
{
result += GetSymbol();
}
else if( IsInteger() )
{
std::stringstream out;
out << GetInteger();
result += out.str();
}
else if( IsDouble() )
{
std::stringstream out;
out << std::setprecision( 16 ) << GetDouble();
result += out.str();
}
return result;
}
示例13: GetChildren
bool wxRibbonPanel::Layout()
{
if(IsMinimised())
{
// Children are all invisible when minimised
return true;
}
// TODO: Delegate to a sizer
// Common case of no sizer and single child taking up the entire panel
if(GetChildren().GetCount() == 1)
{
wxWindow* child = GetChildren().Item(0)->GetData();
wxPoint position;
wxClientDC dc(this);
wxSize size = m_art->GetPanelClientSize(dc, this, GetSize(), &position);
child->SetSize(position.x, position.y, size.GetWidth(), size.GetHeight());
}
return true;
}
示例14: Clone
/// Create a clone of this and children
ctConfiguration* ctConfiguration::DeepClone()
{
ctConfiguration* newItem = Clone();
for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfiguration* child = (ctConfiguration*) node->GetData();
ctConfiguration* newChild = child->DeepClone();
newItem->AddChild(newChild);
}
return newItem;
}
示例15: GetChildren
inline double ConcatSequence::GetDuration () {
double duration = 0.;
vector<Module*> children = GetChildren();
for (RepIter r=begin(); r<end(); ++r)
for (unsigned int j=0; j<children.size() ; ++j)
duration += children[j]->GetDuration();
m_duration = duration;
DEBUG_PRINT(" ConcatSequence::GetDuration() of " << GetName() << " calculates duration = " << duration << endl;)