Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

NDK_XX::NDKDlgPushButton Class Reference

#include <ndk++.h>

Inheritance diagram for NDK_XX::NDKDlgPushButton:

NDK_XX::NDKDlgButton NDK_XX::NDKDlgLabel NDK_XX::NDKDlgControl List of all members.

Public Methods

 NDKDlgPushButton (NDKDlgControl *parent, int id, const string &title,int lines, int cols, int y, int x,int style=tabstop|notify|framed)
 NDKDlgPushButton (NDKDlgControl *parent, int id, const string &title,int y, int x)
void set_text (const string &txt)
 Usualy, a control in a dialog has some kind of text on it...

int action ()

Constructor & Destructor Documentation

NDK_XX::NDKDlgPushButton::NDKDlgPushButton NDKDlgControl   parent,
int    id,
const string &    title,
int    lines,
int    cols,
int    y,
int    x,
int    style = tabstop|notify|framed
 

Definition at line 555 of file ndk++.cc.

References NDK_XX::NDKDlgControl::framed, NDK_XX::NDKDlgControl::on_initial_update, NDK_XX::NDKDlgControl::set_style(), set_text(), and NDK_XX::NDKDlgLabel::text.

00559         :NDKDlgButton(parent,id, title,lines,cols,y,x,(style&=~framed))
00560 {
00561     on_initial_update=true;
00562     set_style(framed,true);
00563     set_text(text);
00564     on_initial_update=false;
00565 }

NDK_XX::NDKDlgPushButton::NDKDlgPushButton NDKDlgControl   parent,
int    id,
const string &    title,
int    y,
int    x
 

Definition at line 569 of file ndk++.cc.

References NDK_XX::NDKDlgControl::framed, NDK_XX::NDKDlgControl::on_initial_update, NDK_XX::NDKDlgControl::set_style(), set_text(), and NDK_XX::NDKDlgLabel::text.

00572         :NDKDlgButton(parent,id,title,1,title.size()+3,y,x,tabstop|notify)
00573 {
00574     on_initial_update=true;
00575     set_style(framed,true);
00576     set_text(text);
00577     on_initial_update=false; 
00578 }


Member Function Documentation

int NDK_XX::NDKDlgPushButton::action   [inline, virtual]
 

Implements NDK_XX::NDKDlgButton.

Definition at line 702 of file ndk++.h.

References NDK_XX::NDKDlgListItem::is_checked(), and NDK_XX::NDKDlgLabel::text.

00702     {
00703         if(!text.empty()){
00704             if(is_checked()) addch(0,0, '*');
00705             else addch(0,0, ' ');

void NDK_XX::NDKDlgPushButton::set_text const string &    txt [virtual]
 

Usualy, a control in a dialog has some kind of text on it...

Reimplemented from NDK_XX::NDKDlgLabel.

Definition at line 582 of file ndk++.cc.

References NDK_XX::NDKDlgControl::has_frame(), NDK_XX::NDKDlgLabel::max_len(), NDK_XX::NDKDlgLabel::pos_x, and NDK_XX::NDKDlgLabel::text.

Referenced by NDKDlgPushButton().

00583 {
00584     int max_len = width()-pos_x-has_frame();
00585     string new_text= v.substr(0, max_len); 
00586     text = new_text;
00587     clrtoeol(); 
00588     centertext(0,text.c_str());
00589     if(has_frame()){
00590         addch(0,0, '[');
00591         addch(0,maxx(), ']');
00592     }
00593     move(0,0);
00594     refresh();
00595 }


The documentation for this class was generated from the following files:
Generated on Tue Aug 27 10:49:47 2002 by doxygen1.2.17