tesseract 3.04.01

SVMenuNode Class Reference

#include <svmnode.h>

List of all members.

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 35 of file svmnode.h.


Constructor & Destructor Documentation

SVMenuNode::SVMenuNode ( )

Definition at line 45 of file svmnode.cpp.

                       {
  cmd_event_ = -1;
  child_ = NULL;
  next_ = NULL;
  parent_ = NULL;
  toggle_value_ = false;
  is_check_box_entry_ = false;
}
SVMenuNode::~SVMenuNode ( )

Definition at line 54 of file svmnode.cpp.

                        {
}

Member Function Documentation

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

Definition at line 59 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 66 of file svmnode.cpp.

                                                            {
  this->AddChild(new SVMenuNode(command_event, txt, false, false, NULL, NULL));
}
void SVMenuNode::AddChild ( const char *  txt,
int  command_event,
const char *  val,
const char *  desc 
)

Definition at line 78 of file svmnode.cpp.

                                            {
  this->AddChild(new SVMenuNode(command_event, txt, false, false, val, desc));
}
void SVMenuNode::AddChild ( const char *  txt,
int  command_event,
const char *  val 
)

Definition at line 72 of file svmnode.cpp.

                                           {
  this->AddChild(new SVMenuNode(command_event, txt, false, false, val, NULL));
}
void SVMenuNode::AddChild ( const char *  txt,
int  command_event,
int  tv 
)

Definition at line 84 of file svmnode.cpp.

                                                                    {
  this->AddChild(new SVMenuNode(command_event, txt, tv, true, NULL, NULL));
}
void SVMenuNode::BuildMenu ( ScrollView sv,
bool  menu_bar = true 
)

Definition at line 121 of file svmnode.cpp.

                                                        {
  if ((parent_ != NULL) && (menu_bar)) {
    if (is_check_box_entry_) {
      sv->MenuItem(parent_->text_.string(), text_.string(), cmd_event_,
                   toggle_value_);
    } else {
      sv->MenuItem(parent_->text_.string(), text_.string(), cmd_event_); }
  } else if ((parent_ != NULL) && (!menu_bar)) {
    if (description_.length() > 0) {
      sv->PopupItem(parent_->text_.string(), text_.string(), cmd_event_,
                    value_.string(), description_.string());
      } else {
      sv->PopupItem(parent_->text_.string(), text_.string());
    }
  }
  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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines