#include <ndk++.h>
Inheritance diagram for NDK_XX::PropertyDialog:
Public Methods | |
PropertyDialog (int id, const string &title, int lines, int cols, int y=0, int x=0) | |
~PropertyDialog () | |
void | add_page (PropertyPage *new_page) |
Insert a new page on this stack. | |
void | set_selected_page (int page) |
Show the selected page. | |
int | get_selected_page () |
bool | valid_page_number (int page) |
Check if page number is valid. | |
PropertyPage * | get_page (int page) |
Protected Methods | |
void | on_dlg_init () |
called at the beggining of the modal loop | |
void | reorder_pages () |
void | create_buttons () |
called on construction of dialog | |
int | get_next_tab_pos () |
virtual void | on_page_modified (int page) |
virtual void | on_page_selected (int page) |
virtual void | on_apply () |
void | on_focus_to_buttons () |
void | on_return_to_page () |
virtual void | cancel_to_close () |
Once the user Apply, we can't cancel... | |
DECLARE_BINDINGS () | |
Protected Attributes | |
PushButton *& | pBtnApply |
int | curr_page |
ListOfPages | pages |
|
PropertyDialog Constructor
Definition at line 2252 of file ndk++.cc.
|
|
Definition at line 2270 of file ndk++.cc.
02271 { 02272 } |
|
Insert a new page on this stack.
Definition at line 2340 of file ndk++.cc. References NDK_XX::DialogBox::add_child(), NDK_XX::Control::get_ctrl_id(), get_next_tab_pos(), NDK_XX::DialogBox::get_text(), pages, and NDK_XX::Tab::set_page(). Referenced by TabbedDlgBox::on_dlg_init().
02341 { 02342 Tab *pTab = new Tab(this,new_page->get_ctrl_id(),new_page->get_text(),0,get_next_tab_pos()); 02343 pages.push_back(pTab); 02344 pTab->set_page(new_page); 02345 add_child(pTab); 02346 } |
|
Once the user Apply, we can't cancel...
Definition at line 2363 of file ndk++.cc. References NDK_XX::DialogBox::changed, NDK_XX::Control::enable(), pBtnApply, NDK_XX::DialogBox::pBtnCancel, NDK_XX::DialogBox::pBtnOk, and NDK_XX::PushButton::set_text().
02364 { 02365 changed = false; 02366 pBtnOk->enable(false); 02367 pBtnApply->enable(false); 02368 pBtnCancel->set_text(" Close "); 02369 } |
|
called on construction of dialog
Reimplemented from NDK_XX::DialogBox. Definition at line 2284 of file ndk++.cc. References NDK_XX::DialogBox::add_child(), NDK_XX::DialogBox::btn_w, NDK_XX::DialogBox::btns, NDK_XX::Control::enable(), NDK_XX::Control::framed, IDAPPLY, IDCANCEL, IDOK, NDK_XX::DialogBox::lblApply, NDK_XX::DialogBox::lblCancel, NDK_XX::DialogBox::lblOk, NDK_XX::DialogBox::my_w, pBtnApply, NDK_XX::DialogBox::pBtnCancel, NDK_XX::DialogBox::pBtnOk, NDK_XX::DialogBox::spc, NDK_XX::DialogBox::used_width, and NDK_XX::DialogBox::X_POS(). Referenced by on_dlg_init().
02285 { 02286 Label *pFrame = new Label(this,-1,"",3,width(),maxy()-2,0,framed); 02287 pFrame->enable(false); 02288 add_child(pFrame); 02289 my_w = width()-2; ///useable width 02290 btn_w= 9; ///each button width 02291 btns=3; ///number of buttons 02292 used_width=btn_w*btns; ///total buttons width 02293 spc=2; ///space between buttons 02294 pBtnOk=new PropDlgPushButton(this,IDOK,lblOk,maxy()-1,X_POS(0)); 02295 pBtnOk->enable(false); 02296 add_child(pBtnOk); 02297 pBtnApply=new PropDlgPushButton(this,IDAPPLY,lblApply,maxy()-1,X_POS(1)); 02298 pBtnApply->enable(false); 02299 add_child(pBtnApply); 02300 pBtnCancel=new PropDlgPushButton(this,IDCANCEL,lblCancel,maxy()-1,X_POS(2)); 02301 add_child(pBtnCancel); 02302 } |
|
Reimplemented from NDK_XX::DialogBox. |
|
Definition at line 2306 of file ndk++.cc. References pages. Referenced by add_page().
|
|
Definition at line 2330 of file ndk++.cc. References pages, and valid_page_number().
02331 { 02332 if(valid_page_number(page)) 02333 return pages[page]->get_page(); 02334 02335 throw Exception<PropertyDialog>(this,"Invalid page number!",-1); 02336 } |
|
Definition at line 2022 of file ndk++.h.
02035 {}; |
|
|
|
called at the beggining of the modal loop
Reimplemented from NDK_XX::DialogBox. Reimplemented in TabbedDlgBox. Definition at line 2276 of file ndk++.cc. References create_buttons(), NDK_XX::DialogBox::pBtnCancel, and NDK_XX::DialogBox::set_focus_to().
02277 { 02278 create_buttons(); 02279 set_focus_to(pBtnCancel); 02280 } |
|
|
|
Definition at line 2038 of file ndk++.h.
02040 {};
02041
02042 protected:
|
|
Definition at line 2044 of file ndk++.h. References NDK_XX::Application::param_file_name, and NDK_XX::Application::pStatusBar. |
|
Definition at line 2059 of file ndk++.h.
02061 {
02062 return Application::get_application()->get_param(section_name,key_name,val);
|
|
Definition at line 2350 of file ndk++.cc. References NDK_XX::Control::mvwin(), and pages.
|
|
Show the selected page.
Definition at line 2322 of file ndk++.cc. References pages, NDK_XX::DialogBox::set_focus_to(), and valid_page_number().
02323 { 02324 if(valid_page_number(page)) 02325 set_focus_to(pages[page]); 02326 } |
|
Check if page number is valid.
Definition at line 2025 of file ndk++.h. Referenced by get_page(), and set_selected_page().
02035 {}; |
|
Definition at line 2031 of file ndk++.h. Referenced by NDK_XX::Tab::action(), and NDK_XX::PropertyPage::on_apply(). |
|
Definition at line 2032 of file ndk++.h. Referenced by NDK_XX::Tab::action(), add_page(), NDK_XX::PropertyPage::create_buttons(), get_next_tab_pos(), get_page(), TabbedDlgBox::on_dlg_init(), reorder_pages(), and set_selected_page(). |
|
Definition at line 2030 of file ndk++.h. Referenced by cancel_to_close(), and create_buttons(). |