#include <ndk++.h>
Inheritance diagram for NDK_XX::PopUpMenu:

Public Methods | |
| PopUpMenu (const string &text) | |
| ~PopUpMenu () | |
| int | action () |
| int | largest_name_len () const |
Protected Attributes | |
| string | sub_menu_label |
| So we can know the right width for the submenu. | |
| ListItems | items |
| SubMenu * | S |
| int | cur_sel |
|
|
Definition at line 1526 of file ndk++.h. References NDK_XX::DialogBox::_title.
01529 {return _title;}
|
|
|
Definition at line 1826 of file ndk++.cc. References S.
01827 {
01828 delete S;
01829 // ListItems::iterator d;
01830 // for(d=items.begin();d!=items.end();d++){
01831 // delete *d;
01832 // }
01833 }
|
|
|
Reimplemented from NDK_XX::MenuItemData. Definition at line 1786 of file ndk++.cc. References NDK_XX::MenuBar::add_item(), cur_sel, NDK_XX::MenuBar::execute(), NDK_XX::ListBox::get_cur_pos(), items, NDK_XX::MenuBar::items_owner(), largest_name_len(), NDK_XX::MenuItemData::pMenuItem, S, NDK_XX::ListBox::set_cur_pos(), and sub_menu_label.
01787 {
01788 int result = false;
01789 S = new SubMenu(-1,sub_menu_label
01790 ,items.size(),largest_name_len()
01791 ,pMenuItem->begy(),pMenuItem->begx(),'v');
01792 S->items_owner(false);
01793 ListItems::iterator it;
01794 for(it=items.begin();it!=items.end();it++){
01795 S->add_item((MenuItemData *)*it);
01796 }
01797 S->set_cur_pos(cur_sel);
01798 result = S->execute();
01799 cur_sel = S->get_cur_pos();
01800 refresh();
01801 delete S;
01802
01803 return false;
01804 }
|
|
|
Definition at line 1808 of file ndk++.cc. Referenced by action().
01808 {
01809 unsigned MaximumNameLength = 0;
01810 ListItems::const_iterator it;
01811 for(it = items.begin(); it !=items.end();it++){
01812 string name((*it)->get_text());
01813
01814 if (name.size() > MaximumNameLength ){
01815 MaximumNameLength = name.size();
01816 }
01817 }
01818 if(sub_menu_label.size() > MaximumNameLength)
01819 MaximumNameLength = sub_menu_label.size();
01820 return MaximumNameLength;
01821 }
|
|
|
Definition at line 1538 of file ndk++.h. Referenced by action(), NDK_XX::MenuBar::move_down(), and NDK_XX::MenuBar::move_right(). |
|
|
Definition at line 1536 of file ndk++.h. Referenced by action(), AnotherPopUpCmd::AnotherPopUpCmd(), APopUpCmd::APopUpCmd(), and NDK_XX::MenuBar::move_left(). |
|
|
Definition at line 1537 of file ndk++.h. Referenced by action(), NDK_XX::MenuBar::move_down(), NDK_XX::MenuBar::move_left(), and ~PopUpMenu(). |
|
|
So we can know the right width for the submenu.
Definition at line 1535 of file ndk++.h. Referenced by action(), AnotherPopUpCmd::AnotherPopUpCmd(), APopUpCmd::APopUpCmd(), and NDK_XX::MenuBar::move_left(). |
1.2.17