本文整理汇总了C++中Fl_Tree_Item::has_children方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Tree_Item::has_children方法的具体用法?C++ Fl_Tree_Item::has_children怎么用?C++ Fl_Tree_Item::has_children使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Tree_Item
的用法示例。
在下文中一共展示了Fl_Tree_Item::has_children方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openTreeItem
void onelabGroup::openTreeItem(const std::string &name)
{
Fl_Tree_Item *n = _tree->find_item(name.c_str());
if(n && n->has_children()){
n->open();
_tree->redraw();
}
}
示例2: assign_user_icons
void Fineline_File_System_Tree::assign_user_icons()
{
static const char *L_folder_xpm[] = {
"11 11 3 1",
". c None",
"x c #d8d833",
"@ c #808011",
"...........",
"[email protected]@@@..",
"[email protected]@.",
"@@@@@[email protected]@",
"@[email protected]",
"@[email protected]",
"@[email protected]",
"@[email protected]",
"@[email protected]",
"@[email protected]",
"@@@@@@@@@@@"};
static Fl_Pixmap L_folderpixmap(L_folder_xpm);
static const char *L_document_xpm[] = {
"11 11 3 1",
". c None",
"x c #d8d8f8",
"@ c #202060",
"[email protected]@@@@@@@@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@.",
"[email protected]@@@@@@@@."};
static Fl_Pixmap L_documentpixmap(L_document_xpm);
// Assign user icons to tree items
for ( Fl_Tree_Item *item = first(); item; item=item->next())
{
item->usericon(item->has_children() ? &L_folderpixmap : &L_documentpixmap);
}
}
开发者ID:sanyaade-g2g-repos,项目名称:fineline-computer-forensics-timeline-tools,代码行数:45,代码来源:Fineline_File_System_Tree.cpp
示例3: unmark_file
void Fineline_File_System_Tree::unmark_file()
{
Fl_Tree_Item *flti = first_selected_item();
fl_file_record_t *flrec = NULL;
char file_path[FL_PATH_MAX]; // FL_PATH_MAX 2048 is an FLTK constant, Fineline FL_PATH_MAX_LENGTH 4096
string full_path;
if (flti != 0)
{
if (item_pathname(file_path, FL_PATH_MAX, flti) != 0)
{
Fineline_Log::print_log_entry("Fineline_File_System_Tree::unmark_file() <ERROR> Could not get tree item path.");
fl_message(" <ERROR> Could not get tree item. ");
return;
}
full_path.append(file_path);
flrec = find_file(full_path);
if (flrec != NULL)
{
flrec->marked = 0;
flti->labelcolor(FL_FOREGROUND_COLOR);
flti->labelfont(FL_COURIER);
if (flrec->file_type == TSK_FS_META_TYPE_DIR) //If a directory then mark all the files in the directory.
{
//TODO: recursively iterate through the tree subdirectory children and mark each one.
if (flti->has_children())
{
unmark_children(flti);
}
}
Fl::awake();
}
}
return;
}
开发者ID:sanyaade-g2g-repos,项目名称:fineline-computer-forensics-timeline-tools,代码行数:36,代码来源:Fineline_File_System_Tree.cpp