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

NDK_XX::ListItemData Class Reference

#include <ndk++.h>

Inheritance diagram for NDK_XX::ListItemData:

NDK_XX::MenuItemData NDK_XX::ExitCmd NDK_XX::NonImplementedItem NDK_XX::PopUpMenu ShowTabbedDialogCmd ShowTestDialogCmd AnotherPopUpCmd APopUpCmd List of all members.

Public Methods

 ListItemData (const string &txt, int id=-1,int style=Control::tabstop|Control::notify,int state=0, void *data=0)
ListItemData & operator= (const ListItem &lha)
ListItemData & operator= (const ListItemData &lha)
void set_text (const string &txt)
string get_text () const
void set_ctrl_id (int id)
int get_ctrl_id () const
void set_styles (int style)
int get_style () const
void set_states (int state)
int get_state () const
int set_state (int s, bool on=true)
 set/unset a state bit

void set_user_data (void *data)
void * get_user_data () const
void set_check (bool new_state=true)
 set/unset check mark

bool is_checked () const
 is this item selected?

void set_default (bool t_or_f=true)
bool is_default () const
virtual int action ()
virtual int driver (int key)

Protected Attributes

string text
int ctrl_id
int field_style
int field_state
bool default_choice
void * user_data

Friends

class ListBox

Constructor & Destructor Documentation

NDK_XX::ListItemData::ListItemData const string &    txt,
int    id = -1,
int    style = Control::tabstop|Control::notify,
int    state = 0,
void *    data = 0
[inline]
 

ListItemData Constructor

Parameters:
txt  the label of this list item
id  a user defined int identifying this item
style  style indications for enabling/disabling control's capabilities
state  what is the state of this item
data  user defined data. we save this and give it back to the user untouched and unevaluated

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

00801                        {
00802         viewport->deleteln();


Member Function Documentation

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

Reimplemented in NDK_XX::MenuItemData, NDK_XX::ExitCmd, NDK_XX::PopUpMenu, ShowTestDialogCmd, and ShowTabbedDialogCmd.

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

00840 :

virtual int NDK_XX::ListItemData::driver int    key [inline, virtual]
 

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

00842 {

int NDK_XX::ListItemData::get_ctrl_id   const [inline]
 

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

Referenced by NDK_XX::ListItem::operator=(), and operator=().

00821 : public ListItem

int NDK_XX::ListItemData::get_state   const [inline]
 

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

Referenced by NDK_XX::ListItem::operator=(), and operator=().

00821 : public ListItem

int NDK_XX::ListItemData::get_style   const [inline]
 

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

Referenced by NDK_XX::ListItem::operator=(), and operator=().

00821 : public ListItem

string NDK_XX::ListItemData::get_text   const [inline]
 

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

Referenced by NDK_XX::ListItem::operator=(), and operator=().

00811 {return FALSE;}

void* NDK_XX::ListItemData::get_user_data   const [inline]
 

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

Referenced by NDK_XX::ListItem::operator=(), and operator=().

00840 :

bool NDK_XX::ListItemData::is_checked   const [inline]
 

is this item selected?

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

References NDK_XX::Control::title.

Referenced by NDK_XX::PushButton::action().

00840          :

bool NDK_XX::ListItemData::is_default   const [inline]
 

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

Referenced by NDK_XX::ListItem::operator=(), and operator=().

00840 :

ListItemData & NDK_XX::ListItemData::operator= const ListItemData &    lha
 

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

References get_ctrl_id(), get_state(), get_style(), get_text(), get_user_data(), is_default(), set_ctrl_id(), set_default(), set_states(), set_styles(), set_text(), and set_user_data().

00469 {
00470     set_text(rha.get_text());
00471     set_ctrl_id(rha.get_ctrl_id());
00472     set_styles(rha.get_style());
00473     set_states(rha.get_state());
00474     set_default(rha.is_default());
00475     set_user_data(rha.get_user_data());
00476     return *this;
00477 }

ListItemData & NDK_XX::ListItemData::operator= const ListItem   lha
 

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

References NDK_XX::Control::get_state(), NDK_XX::Control::get_style(), NDK_XX::Button::is_default(), set_default(), set_states(), and set_styles().

00458 {
00459     set_styles(rha.get_style());
00460     set_states(rha.get_state());
00461     set_default(rha.is_default());
00462     return *this;
00463 }

void NDK_XX::ListItemData::set_check bool    new_state = true [inline]
 

set/unset check mark

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

References NDK_XX::Control::notify, NDK_XX::Control::tabstop, and NDK_XX::Control::title.

00840          :

void NDK_XX::ListItemData::set_ctrl_id int    id [inline]
 

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

Referenced by operator=().

00821 : public ListItem

void NDK_XX::ListItemData::set_default bool    t_or_f = true [inline]
 

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

Referenced by NDK_XX::ListBox::add_item(), and operator=().

00840 :

int NDK_XX::ListItemData::set_state int    s,
bool    on = true
 

set/unset a state bit

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

References field_state.

Referenced by NDK_XX::PushButton::action().

00483 { 
00484     int old_state=field_state;
00485     if (on) field_state|=s;
00486     else    field_state&=~s;
00487     return old_state;
00488 }  

void NDK_XX::ListItemData::set_states int    state [inline]
 

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

Referenced by operator=().

00821 : public ListItem

void NDK_XX::ListItemData::set_styles int    style [inline]
 

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

Referenced by operator=().

00821 : public ListItem

void NDK_XX::ListItemData::set_text const string &    txt [inline]
 

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

Referenced by operator=().

00808 {return 1;};

void NDK_XX::ListItemData::set_user_data void *    data [inline]
 

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

Referenced by operator=().

00840 :


Friends And Related Function Documentation

friend class ListBox [friend]
 

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


Member Data Documentation

int NDK_XX::ListItemData::ctrl_id [protected]
 

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

Referenced by NDK_XX::Button::is_default().

bool NDK_XX::ListItemData::default_choice [protected]
 

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

Referenced by NDK_XX::PropDlgPushButton::PropDlgPushButton().

int NDK_XX::ListItemData::field_state [protected]
 

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

Referenced by NDK_XX::Button::is_default(), NDK_XX::PropDlgPushButton::PropDlgPushButton(), and set_state().

int NDK_XX::ListItemData::field_style [protected]
 

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

Referenced by NDK_XX::Button::is_default().

string NDK_XX::ListItemData::text [protected]
 

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

Referenced by NDK_XX::Button::is_default(), and NDK_XX::MenuBar::move_down().

void* NDK_XX::ListItemData::user_data [protected]
 

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

Referenced by NDK_XX::Button::is_default(), and NDK_XX::PropDlgPushButton::PropDlgPushButton().


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 16:02:19 2002 by doxygen1.2.17