Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
SVMenuNode Class Reference

`#include <svmnode.h>`

List of all members.

## 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)

## Detailed Description

Definition at line 33 of file svmnode.h.

## Constructor & Destructor Documentation

SVMenuNode::SVMenuNode | ( |  | ) |

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;
}

SVMenuNode::~SVMenuNode | ( |  | ) |

Definition at line 57 of file svmnode.cpp.

{
delete[] text_;
// delete[] description_;
}

## Member Function Documentation

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_; }
}

The documentation for this class was generated from the following files:

- /mnt/data/src/tesseract-ocr/viewer/svmnode.h
- /mnt/data/src/tesseract-ocr/viewer/svmnode.cpp