Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuMCBitField Class Reference

This widget provides GUI elementes to manipulate a bitfield. More...

#include <vuMarchingCubes.h>

Inheritance diagram for vuMCBitField:

Inheritance graph
[legend]
Collaboration diagram for vuMCBitField:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { idMCBFCheckboxes = 13000, idMCBFSlider = idMCBFCheckboxes+VU_MCBF_MAX_SIZE, idMCBFLast }

Public Member Functions

 vuMCBitField ()
 Default constructor.
 vuMCBitField (wxWindow *p, const char *title, vuMCDecorator< int > *cb, int size, int init)
 Constructs the bitfield with.
virtual ~vuMCBitField ()
 Destructor.
void operator= (int val)
 Bitfield setter by one number.
void operator() (int n, bool val)
 Bitfield bit setter.
 operator int ()
 Bitfield getter.
vuMCBitFieldoperator[] (int n)
 As in vuMCKeyVector this operator only sets the internal state.
void operator= (bool val)
 Depending on the internal state, a bit is set to val.
void OnCheckboxClicked (wxCommandEvent &event)
 Processes the checkbox events.
void OnScroll (wxScrollEvent &event)
 Processes changes of the slider Position.
 DECLARE_DYNAMIC_CLASS (vuMCBitField)
 DECLARE_EVENT_TABLE ()

Private Member Functions

void _setTitle (int val)
void _setCheckboxes (int val)
 Sets _checkboxes and _title to val.

Private Attributes

vuMCDecorator< int > * _callback
 Manipulation callback.
const char * _titleString
 Part of the title befor the value.
wxStaticText * _title
 This label combines the title and the value of the slider.
int _size
 Actual size of the bit field.
wxCheckBox * _checkboxes [VU_MCBF_MAX_SIZE]
 The bitfield checkboxes.
wxSlider * _slider
 The Bitfield slider.
int _pos
 The bit that should be manipulated.

Detailed Description

This widget provides GUI elementes to manipulate a bitfield.

The maximum size of the bitfield is defined by VU_MCBF_MAX_SIZE. The widget presents a checkbox for every bit and a slider to manipulate the bitfield and a label to display it's value. The slider updates the checkboxes and vice versa and the both widgets update the label.

Definition at line 481 of file vuMarchingCubes.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
idMCBFCheckboxes 
idMCBFSlider 
idMCBFLast 

Definition at line 485 of file vuMarchingCubes.h.


Constructor & Destructor Documentation

vuMCBitField::vuMCBitField  )  [inline]
 

Default constructor.

Definition at line 523 of file vuMarchingCubes.h.

vuMCBitField::vuMCBitField wxWindow *  p,
const char *  title,
vuMCDecorator< int > *  cb,
int  size,
int  init
 

Constructs the bitfield with.

vuMCBitField::~vuMCBitField  )  [virtual]
 

Destructor.

Definition at line 279 of file vuMarchingCubes.cpp.

References _checkboxes, and DEBUGD.


Member Function Documentation

void vuMCBitField::_setCheckboxes int  val  )  [private]
 

Sets _checkboxes and _title to val.

Definition at line 295 of file vuMarchingCubes.cpp.

References _checkboxes, and DEBUG0.

Referenced by OnScroll(), and operator=().

void vuMCBitField::_setTitle int  val  )  [private]
 

Definition at line 289 of file vuMarchingCubes.cpp.

References _title, _titleString, and DEBUG0.

Referenced by OnScroll(), and operator=().

vuMCBitField::DECLARE_DYNAMIC_CLASS vuMCBitField   ) 
 

vuMCBitField::DECLARE_EVENT_TABLE  ) 
 

Reimplemented from vuMCWidget.

void vuMCBitField::OnCheckboxClicked wxCommandEvent &  event  ) 
 

Processes the checkbox events.

Definition at line 356 of file vuMarchingCubes.cpp.

References _checkboxes, _size, _slider, assert, DEBUG0, and DEBUG1.

void vuMCBitField::OnScroll wxScrollEvent &  event  ) 
 

Processes changes of the slider Position.

Definition at line 367 of file vuMarchingCubes.cpp.

References _setCheckboxes(), _setTitle(), _slider, DEBUG0, and DEBUG1.

Here is the call graph for this function:

vuMCBitField::operator int  ) 
 

Bitfield getter.

Definition at line 326 of file vuMarchingCubes.cpp.

References _slider, and DEBUG0.

void vuMCBitField::operator() int  n,
bool  val
 

Bitfield bit setter.

Change the bit, if val is true and the bit is not set.

Change the bit, if val is false and the bit is set.

Definition at line 311 of file vuMarchingCubes.cpp.

References _size, _slider, assert, DEBUG0, and operator=().

Here is the call graph for this function:

void vuMCBitField::operator= bool  val  ) 
 

Depending on the internal state, a bit is set to val.

Change the bit, if val is true and the bit is not set.

Change the bit, if val is false and the bit is set.

In all other cases do nothing.

Definition at line 340 of file vuMarchingCubes.cpp.

References _slider, assert, DEBUG0, and operator=().

Here is the call graph for this function:

void vuMCBitField::operator= int  val  ) 
 

Bitfield setter by one number.

Definition at line 303 of file vuMarchingCubes.cpp.

References _setCheckboxes(), _setTitle(), _slider, and DEBUG0.

Referenced by operator()(), and operator=().

Here is the call graph for this function:

vuMCBitField & vuMCBitField::operator[] int  n  ) 
 

As in vuMCKeyVector this operator only sets the internal state.

Definition at line 332 of file vuMarchingCubes.cpp.

References _size, assert, and DEBUG0.


Member Data Documentation

vuMCDecorator<int>* vuMCBitField::_callback [private]
 

Manipulation callback.

Definition at line 494 of file vuMarchingCubes.h.

wxCheckBox* vuMCBitField::_checkboxes[VU_MCBF_MAX_SIZE] [private]
 

The bitfield checkboxes.

Definition at line 502 of file vuMarchingCubes.h.

Referenced by _setCheckboxes(), OnCheckboxClicked(), and ~vuMCBitField().

int vuMCBitField::_pos [private]
 

The bit that should be manipulated.

This member is initialised with -1 and operater[] sets it to a specified value (see also vuMCKeyVector).

Definition at line 514 of file vuMarchingCubes.h.

int vuMCBitField::_size [private]
 

Actual size of the bit field.

Definition at line 500 of file vuMarchingCubes.h.

Referenced by OnCheckboxClicked(), operator()(), and operator[]().

wxSlider* vuMCBitField::_slider [private]
 

The Bitfield slider.

This slider is initialized to a range from zero to the maximum integer number that could be generated with the number of bits defined by size.

Definition at line 508 of file vuMarchingCubes.h.

Referenced by OnCheckboxClicked(), OnScroll(), operator int(), operator()(), and operator=().

wxStaticText* vuMCBitField::_title [private]
 

This label combines the title and the value of the slider.

Definition at line 498 of file vuMarchingCubes.h.

Referenced by _setTitle().

const char* vuMCBitField::_titleString [private]
 

Part of the title befor the value.

Definition at line 496 of file vuMarchingCubes.h.

Referenced by _setTitle().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:26 2004 for vuVolume by  doxygen 1.3.9.1