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

#include <svmnode.h>

Public Member Functions

 SVMenuNode ()
 
 ~SVMenuNode ()
 
SVMenuNodeAddChild (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.

45  {
46  cmd_event_ = -1;
47  text_ = NULL;
48  child_ = NULL;
49  next_ = NULL;
50  parent_ = NULL;
51  toggle_value_ = false;
52  is_check_box_entry_ = false;
53  value_ = NULL;
54  description_ = NULL;
55 }
#define NULL
Definition: host.h:144
SVMenuNode::~SVMenuNode ( )

Definition at line 57 of file svmnode.cpp.

57  {
58  delete[] text_;
59 // delete[] description_;
60 }

Member Function Documentation

SVMenuNode * SVMenuNode::AddChild ( const char *  txt)

Definition at line 64 of file svmnode.cpp.

64  {
65  SVMenuNode* s = new SVMenuNode(-1, txt, false, false, NULL, NULL);
66  this->AddChild(s);
67  return s;
68 }
SVMenuNode * AddChild(const char *txt)
Definition: svmnode.cpp:64
#define NULL
Definition: host.h:144
SVMenuNode()
Definition: svmnode.cpp:45
void SVMenuNode::AddChild ( const char *  txt,
int  command_event 
)

Definition at line 71 of file svmnode.cpp.

71  {
72  this->AddChild(new SVMenuNode(command_event, txt, false, false, NULL, NULL));
73 }
SVMenuNode * AddChild(const char *txt)
Definition: svmnode.cpp:64
#define NULL
Definition: host.h:144
SVMenuNode()
Definition: svmnode.cpp:45
void SVMenuNode::AddChild ( const char *  txt,
int  command_event,
int  tv 
)

Definition at line 89 of file svmnode.cpp.

89  {
90  this->AddChild(new SVMenuNode(command_event, txt, tv, true, NULL, NULL));
91 }
SVMenuNode * AddChild(const char *txt)
Definition: svmnode.cpp:64
#define NULL
Definition: host.h:144
SVMenuNode()
Definition: svmnode.cpp:45
void SVMenuNode::AddChild ( const char *  txt,
int  command_event,
const char *  val 
)

Definition at line 77 of file svmnode.cpp.

78  {
79  this->AddChild(new SVMenuNode(command_event, txt, false, false, val, NULL));
80 }
SVMenuNode * AddChild(const char *txt)
Definition: svmnode.cpp:64
#define NULL
Definition: host.h:144
SVMenuNode()
Definition: svmnode.cpp:45
void SVMenuNode::AddChild ( const char *  txt,
int  command_event,
const char *  val,
const char *  desc 
)

Definition at line 83 of file svmnode.cpp.

84  {
85  this->AddChild(new SVMenuNode(command_event, txt, false, false, val, desc));
86 }
SVMenuNode * AddChild(const char *txt)
Definition: svmnode.cpp:64
SVMenuNode()
Definition: svmnode.cpp:45
void SVMenuNode::BuildMenu ( ScrollView sv,
bool  menu_bar = true 
)

Definition at line 132 of file svmnode.cpp.

132  {
133  if ((parent_ != NULL) && (menu_bar)) {
134  if (is_check_box_entry_) {
135  sv->MenuItem(parent_->text_, text_, cmd_event_, toggle_value_);
136  } else { sv->MenuItem(parent_->text_, text_, cmd_event_); }
137  } else if ((parent_ != NULL) && (!menu_bar)) {
138  if (description_ != NULL) { sv->PopupItem(parent_->text_, text_,
139  cmd_event_, value_, description_);
140  } else { sv->PopupItem(parent_->text_, text_); }
141  }
142  if (child_ != NULL) { child_->BuildMenu(sv, menu_bar); delete child_; }
143  if (next_ != NULL) { next_->BuildMenu(sv, menu_bar); delete next_; }
144 }
void BuildMenu(ScrollView *sv, bool menu_bar=true)
Definition: svmnode.cpp:132
void MenuItem(const char *parent, const char *name)
Definition: scrollview.cpp:681
#define NULL
Definition: host.h:144
void PopupItem(const char *parent, const char *name)
Definition: scrollview.cpp:687

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