#include <ndk++.h>
Inheritance diagram for NDK_XX::PropertyPage:
Public Methods | |
PropertyPage (PropertyDialog *parent, int id, const string &title,int lines, int cols, int y=0, int x=0) | |
~PropertyPage () | |
int | refresh () |
Protected Methods | |
int | process_key (int key) |
Non-modal equivalent of do_modal(). | |
int | driver (int key) |
void | do_initial_update () |
Non-modal wrapper for calling on_dlg_init from the constructor. | |
void | on_dlg_init () |
We redefine here so we get called on construction. | |
void | on_cmd (int dlg_req) |
Kind of catch-all for derived windows. | |
virtual void | on_page_change () |
Called when some control change. | |
virtual void | on_apply () |
called by parent when user pushes the "Apply" button | |
void | create_buttons () |
called on construction of dialog | |
Protected Attributes | |
PropertyDialog * | pDialog |
Friends | |
class | Tab |
class | PropertyDialog |
|
DialogBox Constructor
Definition at line 1864 of file ndk++.h. References NDK_XX::Tab::pPage.
01868 { 01869 // send_to_log("hide en Tab")<< pPage->get_text()<< endl; 01870 if(is_visible()) |
|
Definition at line 1871 of file ndk++.h. References NDK_XX::Tab::pPage.
01876 { return pPage;}
|
|
called on construction of dialog
Reimplemented from NDK_XX::DialogBox. Definition at line 1921 of file ndk++.h. References NDK_XX::PropertyDialog::pages. Referenced by TabbedDlgPage2::on_dlg_init().
01922 {return (page < pages.size() && page > -1);}
01923
|
|
Non-modal wrapper for calling on_dlg_init from the constructor.
Definition at line 1897 of file ndk++.h. Referenced by NDK_XX::DialogBox::end_dialog(), TabbedDlgPage1::TabbedDlgPage1(), and TabbedDlgPage2::TabbedDlgPage2().
01897 : 01898 /** 01899 PropertyDialog Constructor 01900 @param id 01901 a user defined const int identifying this window @param lines: |
|
get a chance at processing the key, before parent does Reimplemented from NDK_XX::DialogBox. Definition at line 1894 of file ndk++.h. Referenced by process_key().
01895 : public DialogBox |
|
called by parent when user pushes the "Apply" button
Definition at line 1916 of file ndk++.h. References NDK_XX::PropertyDialog::curr_page.
01919 { return curr_page;}
|
|
Kind of catch-all for derived windows.
Reimplemented from NDK_XX::DialogBox. Definition at line 2537 of file ndk++.cc. References NDK_XX::DialogBox::bContinueModal, and NDK_XX::Control::clicked_inside(). Referenced by process_key().
02538 { 02539 switch(key) { 02540 #ifdef NCURSES_MOUSE_VERSION 02541 case KEY_MOUSE: 02542 { 02543 MEVENT event; 02544 getmouse(&event); 02545 int ry = event.y, rx = event.x; /* screen coordinates */ 02546 if (mouse_trafo(&ry,&rx,FALSE)){ 02547 if((event.bstate & ( BUTTON1_CLICKED| 02548 BUTTON1_DOUBLE_CLICKED| 02549 BUTTON1_TRIPLE_CLICKED)) 02550 && !clicked_inside(ry, rx)){ 02551 // we react only if the click was in the userwin, that means 02552 // inside the menu display area or at the decoration window. 02553 bContinueModal=false; 02554 } 02555 } 02556 break; 02557 } 02558 #endif 02559 default: break; 02560 } 02561 } |
|
We redefine here so we get called on construction.
Reimplemented from NDK_XX::DialogBox. Reimplemented in TabbedDlgPage1, and TabbedDlgPage2. Definition at line 1904 of file ndk++.h.
01919 { return curr_page;}
|
|
Called when some control change.
Definition at line 1910 of file ndk++.h. References NDK_XX::Control::title. Referenced by TabbedDlgPage2::on_clear_list(), TabbedDlgPage2::on_remove(), and TabbedDlgPage2::on_sel_change().
01919 { return curr_page;}
|
|
Non-modal equivalent of do_modal().
Definition at line 2504 of file ndk++.cc. References NDK_XX::DialogBox::bContinueModal, driver(), NDK_XX::DialogBox::next_control(), on_cmd(), NDK_XX::DialogBox::prev_control(), refresh(), NDK_XX::DialogBox::REQ_DLG_DOWN, NDK_XX::DialogBox::REQ_DLG_EXIT, NDK_XX::DialogBox::REQ_DLG_LEFT, NDK_XX::DialogBox::REQ_DLG_NEXT, NDK_XX::DialogBox::REQ_DLG_PREV, NDK_XX::DialogBox::REQ_DLG_RIGHT, and NDK_XX::DialogBox::REQ_DLG_UP. Referenced by NDK_XX::Tab::driver().
02505 { 02506 refresh(); 02507 bContinueModal=true; 02508 int req=REQ_DLG_EXIT; 02509 do{ 02510 #ifdef NCURSES_MOUSE_VERSION 02511 if(key == KEY_MOUSE){ 02512 req=driver(key); 02513 key=0; 02514 } 02515 else 02516 #endif /* NCURSES_MOUSE_VERSION */ 02517 02518 req=driver(getch()); 02519 switch(req){ 02520 case REQ_DLG_EXIT: 02521 case REQ_DLG_UP: 02522 case REQ_DLG_DOWN: 02523 bContinueModal=false;break; 02524 case REQ_DLG_RIGHT: 02525 case REQ_DLG_NEXT: next_control(); break; 02526 02527 case REQ_DLG_LEFT: 02528 case REQ_DLG_PREV: prev_control(); break; 02529 default: on_cmd(req); break; 02530 } 02531 } while( bContinueModal); 02532 return req; 02533 } |
|
Since we have the dialogs stacked and they are not modal, we need to do this manually Definition at line 1875 of file ndk++.h. References NDK_XX::Tab::pPage. Referenced by NDK_XX::Tab::activate(), and process_key().
01876 { return pPage;} 01877 ///Set the page associated with this tab 01878 void set_page(PropertyPage *page){pPage = page;} 01879 01880 void set_text(const string &txt); 01881 01882 protected: 01883 ///The stacked dialog we manage |
|
|
|
|
|
Do nothing, otherwise OK shows up... Definition at line 1925 of file ndk++.h. Referenced by NDK_XX::DialogBox::end_dialog(). |