Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

os::Control Class Reference

Base class for GUI controls. More...

#include <control.h>

Inheritance diagram for os::Control::

os::View os::Invoker os::Handler os::Button os::CheckBox os::ListView os::RadioButton os::ScrollBar os::Slider os::Spinner os::TextView List of all members.

Public Methods

 Control (const Rect &cFrame, const std::string &cName, const std::string &cLabel, Message *pcMessage, uint32 nResizeMask, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND)
 ~Control ()
virtual void AttachedToWindow (void)
virtual void ValueChanged (Variant *pcNewValue)
virtual bool PreValueChange (Variant *pcNewValue)
virtual void PostValueChange (const Variant &cNewValue)
virtual void LabelChanged (const std::string &cNewLabel)
virtual void EnableStatusChanged (bool bIsEnabled)=0
virtual bool Invoked (Message *pcMessage)
 Intercept outgoing messages. More...

virtual void SetEnable (bool bEnabled)
virtual bool IsEnabled (void) const
virtual void SetLabel (const std::string &cLabel)
virtual std::string GetLabel (void) const
virtual void SetValue (Variant cValue, bool bInvoke=true)
virtual Variant GetValue () const
virtual void __CTRL_reserved1__ ()
virtual void __CTRL_reserved2__ ()
virtual void __CTRL_reserved3__ ()
virtual void __CTRL_reserved4__ ()
virtual void __CTRL_reserved5__ ()

Detailed Description

Description:
See also:
os::Invoker
Author:
Kurt Skauen ([email protected])


Constructor & Destructor Documentation

Control::Control const Rect & cFrame,
const std::string & cName,
const std::string & cLabel,
Message * pcMsg,
uint32 nResizeMask,
uint32 nFlags = WID_WILL_DRAW | WID_CLEAR_BACKGROUND
 

Control::~Control
 


Member Function Documentation

void Control::AttachedToWindow void [virtual]
 

Reimplemented from os::View.

Reimplemented in os::DirectoryView, os::RadioButton, and os::Slider.

virtual void os::Control::EnableStatusChanged bool bIsEnabled [pure virtual]
 

Reimplemented in os::Button, os::CheckBox, os::ListView, os::RadioButton, os::ScrollBar, os::Slider, os::Spinner, and os::TextView.

std::string Control::GetLabel void const [virtual]
 

Variant Control::GetValue void const [virtual]
 

Reimplemented in os::TextView.

bool Control::Invoked Message * pcMessage [virtual]
 

Description:
This member is called from Invoke() just before a message is sendt to the target.

This allow classes that inherits from os::Invoker to add data to or otherwhice modify the message before it is sendt. The message can also be canceled entirely by returning false from this member.

The message passed to Invoked() is a copy of the internal message or the message passed to Invoke() (if any) so any changes made here will not affect the internal message or the message passed to Invoke(). When this method returns the message will imidiatly be sendt to the target and then discarded (unless false is returned in which case the message is simply discarded).

The default implementation of this member does nothing and return true.

Parameters:
pcMessage   Pointer to the message that is about to be sendt. You can do any modification you like to this message (but never delete it).
Returns:
Normally you should return true to indicate that the message should be sendt. You can however return false if you for some reason want to cancel the invokation.
See also:
Invoke(), SetMessage(), SetTarget()
Author:
Kurt Skauen ([email protected])

Reimplemented from os::Invoker.

Reimplemented in os::Button, os::CheckBox, os::ListView, os::RadioButton, os::ScrollBar, os::Slider, os::Spinner, and os::TextView.

bool Control::IsEnabled void const [virtual]
 

Reimplemented in os::Spinner.

void Control::LabelChanged const std::string & cNewLabel [virtual]
 

Reimplemented in os::Button, os::CheckBox, os::ListView, os::RadioButton, os::ScrollBar, os::Spinner, and os::TextView.

void Control::PostValueChange const Variant & cNewValue [virtual]
 

Reimplemented in os::Button, os::CheckBox, os::RadioButton, os::ScrollBar, os::Slider, and os::Spinner.

bool Control::PreValueChange Variant * pcNewValue [virtual]
 

void Control::SetEnable bool bEnabled [virtual]
 

Reimplemented in os::Spinner.

void Control::SetLabel const std::string & cLabel [virtual]
 

void Control::SetValue Variant cValue,
bool bInvoke = true
[virtual]
 

Reimplemented in os::TextView.

void Control::ValueChanged Variant * pcNewValue [virtual]
 

void Control::__CTRL_reserved1__ [virtual]
 

void Control::__CTRL_reserved2__ [virtual]
 

void Control::__CTRL_reserved3__ [virtual]
 

void Control::__CTRL_reserved4__ [virtual]
 

void Control::__CTRL_reserved5__ [virtual]
 


Generated at Tue Sep 11 15:27:46 2001 for AtheOS higlevel API by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001