|
tesseract
3.03
|
#include <svmnode.h>
Public Member Functions | |
| SVMenuNode () | |
| ~SVMenuNode () | |
| SVMenuNode * | AddChild (const char *txt) |
| void | AddChild (const char *txt, int command_event) |
| void | AddChild (const char *txt, int command_event, int tv) |
| void | AddChild (const char *txt, int command_event, const char *val) |
| void | AddChild (const char *txt, int command_event, const char *val, const char *desc) |
| void | BuildMenu (ScrollView *sv, bool menu_bar=true) |
Definition at line 45 of file svmnode.cpp.
{
cmd_event_ = -1;
text_ = NULL;
child_ = NULL;
next_ = NULL;
parent_ = NULL;
toggle_value_ = false;
is_check_box_entry_ = false;
value_ = NULL;
description_ = NULL;
}
Definition at line 57 of file svmnode.cpp.
{
delete[] text_;
// delete[] description_;
}
| SVMenuNode * SVMenuNode::AddChild | ( | const char * | txt | ) |
Definition at line 64 of file svmnode.cpp.
{
SVMenuNode* s = new SVMenuNode(-1, txt, false, false, NULL, NULL);
this->AddChild(s);
return s;
}
| void SVMenuNode::AddChild | ( | const char * | txt, |
| int | command_event | ||
| ) |
Definition at line 71 of file svmnode.cpp.
{
this->AddChild(new SVMenuNode(command_event, txt, false, false, NULL, NULL));
}
| void SVMenuNode::AddChild | ( | const char * | txt, |
| int | command_event, | ||
| int | tv | ||
| ) |
Definition at line 89 of file svmnode.cpp.
{
this->AddChild(new SVMenuNode(command_event, txt, tv, true, NULL, NULL));
}
| void SVMenuNode::AddChild | ( | const char * | txt, |
| int | command_event, | ||
| const char * | val | ||
| ) |
Definition at line 77 of file svmnode.cpp.
{
this->AddChild(new SVMenuNode(command_event, txt, false, false, val, NULL));
}
| void SVMenuNode::AddChild | ( | const char * | txt, |
| int | command_event, | ||
| const char * | val, | ||
| const char * | desc | ||
| ) |
Definition at line 83 of file svmnode.cpp.
{
this->AddChild(new SVMenuNode(command_event, txt, false, false, val, desc));
}
| void SVMenuNode::BuildMenu | ( | ScrollView * | sv, |
| bool | menu_bar = true |
||
| ) |
Definition at line 132 of file svmnode.cpp.
{
if ((parent_ != NULL) && (menu_bar)) {
if (is_check_box_entry_) {
sv->MenuItem(parent_->text_, text_, cmd_event_, toggle_value_);
} else { sv->MenuItem(parent_->text_, text_, cmd_event_); }
} else if ((parent_ != NULL) && (!menu_bar)) {
if (description_ != NULL) { sv->PopupItem(parent_->text_, text_,
cmd_event_, value_, description_);
} else { sv->PopupItem(parent_->text_, text_); }
}
if (child_ != NULL) { child_->BuildMenu(sv, menu_bar); delete child_; }
if (next_ != NULL) { next_->BuildMenu(sv, menu_bar); delete next_; }
}