Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CascadeWidget Class Reference

base class of cascade widgets More...

#include <cascade/widgets/CascadeWidget.h>

Inheritance diagram for CascadeWidget:

CascadeWindow CascadeObject CascadeButtonWidget CascadeLabelWidget CascadePictureWidget CascadeSpinnerWidget CascadeVesselPanel CascadeDirBrowser::BrowserButton List of all members.

Public Types

enum  Scheme {
  kActiveNormal = 0, kActiveFocus = 1, kInactiveNormal = 2, kInactiveFocus = 3,
  kDisabled = 4, kNumSchemes = kDisabled + 1
}

Public Member Functions

 CascadeWidget ()
virtual ~CascadeWidget ()
CascadeColor GetColorHi ()
CascadeColor GetColorLo ()
CascadeColor GetColorMid ()
CascadeColor GetColorText ()
CascadeFont GetFont ()
void SetDisabled (bool bDisabled, bool bRedraw=true)
bool IsDisabled () const
Scheme GetScheme ()
virtual bool WillAcceptFocus ()

Static Public Member Functions

static CascadeColor GetColorHi (Scheme scheme)
static CascadeColor GetColorLo (Scheme scheme)
static CascadeColor GetColorMid (Scheme scheme)
static CascadeColor GetColorText (Scheme scheme)
static CascadeFont GetFont (Scheme scheme)
static void SetColorHi (const CascadeColor &color, Scheme scheme)
static void SetColorLo (const CascadeColor &color, Scheme scheme)
static void SetColorMid (const CascadeColor &color, Scheme scheme)
static void SetColorText (const CascadeColor &color, Scheme scheme)
static void SetFont (const CascadeFont &font, Scheme scheme)
static void NotifyParametersChanged ()

Protected Attributes

bool m_bDisabled

Friends

class CascadeApp

Detailed Description

base class of cascade widgets

Skip the description

CascadeWidget is the base class of CascadeWidgets.


class CascadeWidgets


Member Enumeration Documentation

enum CascadeWidget::Scheme
 

represents a color/font scheme for widget drawing

For each user interface element (such as color or font) there are 5 schemes depending on the focus and activation state to be rendered.

See also:
SetColorHi(), SetColorMid(), SetColorMid(), SetColorText(), SetFont()

GetColorHi(), GetColorMid(), GetColorMid(), GetColorText(), GetFont()

Enumeration values:
kActiveNormal  the widget is a non-focus widget in the active app
kActiveFocus  the widget is the focus-widget in the active app
kInactiveNormal  the widget is a non-focus widget in an inactive app
kInactiveFocus  the widget is the focus-widget in an inactive app
kDisabled  the widget is disabled
kNumSchemes 


Constructor & Destructor Documentation

CascadeWidget::CascadeWidget  ) 
 

The CascadeWidget constructor - lightweight.

This base class constructor is lightweight.

virtual CascadeWidget::~CascadeWidget  )  [virtual]
 

Destructor.

The destructor.


Member Function Documentation

static CascadeColor CascadeWidget::GetColorHi Scheme  scheme  )  [static]
 

gets the 3d highlight color for a particular scheme

GetColorHi() returns the 3d highlight color for a particular scheme. This function is static so that non-CascadeWidget-derived classes can determine the user interface parameters for a particular scheme.

Parameters:
scheme the scheme to retrieve the color for
Returns:
the 3d highlight color for the scheme

CascadeColor CascadeWidget::GetColorHi  )  [inline]
 

static CascadeColor CascadeWidget::GetColorLo Scheme  scheme  )  [static]
 

gets the 3d lolight color for a particular scheme

GetColorLo() returns the 3d lolight color for a particular scheme. This function is static so that non-CascadeWidget-derived classes can determine the user interface parameters for a particular scheme.

Parameters:
scheme the scheme to retrieve the color for
Returns:
the 3d lolight color for the scheme

CascadeColor CascadeWidget::GetColorLo  )  [inline]
 

<returns the highlight color the widget should use for rendering 3d elements

GetColorHi() automatically takes into account this widget's current focus and activation state and returns the appropriate highlight color for rendering 3d elements.

Returns:
the 3d highlight color this widget should use for rendering now
See also:
GetColorLo(), GetColorMid(), GetColorText(), GetColorText(), GetFont()

SetColorHi()

static CascadeColor CascadeWidget::GetColorMid Scheme  scheme  )  [static]
 

gets the 3d mid color for a particular scheme

GetColorMid() returns the 3d mid color for a particular scheme. This function is static so that non-CascadeWidget-derived classes can determine the user interface parameters for a particular scheme.

Parameters:
scheme the scheme to retrieve the color for
Returns:
the 3d mid color for the scheme

CascadeColor CascadeWidget::GetColorMid  )  [inline]
 

<returns the lolight color the widget should use for rendering 3d elements

GetColorLo() automatically takes into account this widget's current focus and activation state and returns the appropriate lolight color for rendering 3d elements.

Returns:
the 3d lolight color this widget should use for rendering now
See also:
GetColorHi(), GetColorMid(), GetColorText(), GetColorText(), GetFont()

SetColorLo()

static CascadeColor CascadeWidget::GetColorText Scheme  scheme  )  [static]
 

gets the text color for a particular scheme

GetColorText() returns the text color for a particular scheme. This function is static so that non-CascadeWidget-derived classes can determine the user interface parameters for a particular scheme.

Parameters:
scheme the scheme to retrieve the color for
Returns:
the text color for the scheme

CascadeColor CascadeWidget::GetColorText  )  [inline]
 

<returns the background or mid color the widget should use for rendering 3d elements

GetColorMid() automatically takes into account this widget's current focus and activation state and returns the appropriate background or mid color for rendering 3d elements.

Returns:
the 3d mid color this widget should use for rendering now
See also:
GetColorLo(), GetColorHi(), GetColorText(), GetColorText(), GetFont()

SetColorMid()

static CascadeFont CascadeWidget::GetFont Scheme  scheme  )  [static]
 

gets the font for a particular scheme

GetFont() returns the font for a particular scheme. This function is static so that non-CascadeWidget-derived classes can determine the user interface parameters for a particular scheme.

Parameters:
scheme the scheme to retrieve the font for
Returns:
the text font for the scheme

CascadeFont CascadeWidget::GetFont  )  [inline]
 

<returns the text color the widget should use for rendering

GetColorText() automatically takes into account this widget's current focus and activation state and returns the appropriate text color for rendering 3d elements.

Returns:
the text color this widget should use for rendering now
See also:
GetColorLo(), GetColorMid(), GetColorHi(), GetFont()

SetColorText()

Scheme CascadeWidget::GetScheme  ) 
 

gets the scheme the widget should use for rendering

GetScheme() returns the UI scheme that should be used for this widget taking into account the current focus and activation state of this and whether or not the widget is disabled.

Returns:
the ui scheme the widget should use for rendering now
See also:
Scheme

bool CascadeWidget::IsDisabled  )  const [inline]
 

determines if the widget is disabled

IsDisabled determines if the widget is disabled.

Returns:
whether or not the widget is disabled

static void CascadeWidget::NotifyParametersChanged  )  [static]
 

notifies clients you have changed the widget ui scheme parameters

call NotifyParamtersChanged() after changing paramters to notify (to CascadeApps) that the paramters have changed. NotifyParamtersChanged() is a no-op unless paramters have actually changed. NotifyParamtersChanged() will end up causing CascadeApp's OnWidgetParametersChanged() function to be called whose default behavior is to cause all materialized app windows to be redrawn.

See also:
CascadeApp, CascadeApp::OnWidgetParametersChanged()

static void CascadeWidget::SetColorHi const CascadeColor color,
Scheme  scheme
[static]
 

sets the 3d highlight color for a particular scheme

SetColorHi() sets the 3d highlight color for a particular scheme. This function is provided so that clients can set the user interface parameters for a particular scheme.

Note:
After setting a combination of parameters you should call NotifyParametersChanged to notify all apps in the system that you have just changed the parameters. If you do not do this, the notification will take place the next time a client calls a Get() function.
Parameters:
color the color to set as the 3d highlight color
scheme the scheme the color is to be applied to
See also:
NotifyParametersChanged()

static void CascadeWidget::SetColorLo const CascadeColor color,
Scheme  scheme
[static]
 

sets the 3d lolight color for a particular scheme

SetColorLo() sets the 3d lolight color for a particular scheme. This function is provided so that clients can set the user interface parameters for a particular scheme.

Note:
After setting a combination of parameters you should call NotifyParametersChanged to notify all apps in the system that you have just changed the parameters. If you do not do this, the notification will take place the next time a client calls a Get() function.
Parameters:
color the color to set as the 3d lolight color
scheme the scheme the color is to be applied to
See also:
NotifyParametersChanged()

static void CascadeWidget::SetColorMid const CascadeColor color,
Scheme  scheme
[static]
 

sets the 3d mid color for a particular scheme

SetColorMid() sets the 3d mid color for a particular scheme. This function is provided so that clients can set the user interface parameters for a particular scheme.

Note:
After setting a combination of parameters you should call NotifyParametersChanged to notify all apps in the system that you have just changed the parameters. If you do not do this, the notification will take place the next time a client calls a Get() function.
Parameters:
color the color to set as the 3d mid color
scheme the scheme the color is to be applied to
See also:
NotifyParametersChanged()

static void CascadeWidget::SetColorText const CascadeColor color,
Scheme  scheme
[static]
 

sets the text color for a particular scheme

SetColorText() sets the text color for a particular scheme. This function is provided so that clients can set the user interface parameters for a particular scheme.

Note:
After setting a combination of parameters you should call NotifyParametersChanged to notify all apps in the system that you have just changed the parameters. If you do not do this, the notification will take place the next time a client calls a Get() function.
Parameters:
color the color to set as the text color
scheme the scheme the color is to be applied to
See also:
NotifyParametersChanged()

void CascadeWidget::SetDisabled bool  bDisabled,
bool  bRedraw = true
 

sets the widget to be disabled or un-disabled

Call SetDisabled() to mark the widget disabled; it will be rendered in its disabled state. SetDisabled(true) will only work if this is not the focus window. (You cannot disable the focus window).

Parameters:
bDisabled true to set the widget disabled, false to enable it
bRedraw whether or not to redraw the widget in its new state
See also:
IsDisabled()

static void CascadeWidget::SetFont const CascadeFont font,
Scheme  scheme
[static]
 

sets the font for a particular scheme

SetFont() sets the text font for a particular scheme. This function is provided so that clients can set the user interface parameters for a particular scheme.

Note:
After setting a combination of parameters you should call NotifyParametersChanged to notify all apps in the system that you have just changed the parameters. If you do not do this, the notification will take place the next time a client calls a Get() function.
Parameters:
font the text font to set
scheme the scheme the font is to be applied to
See also:
NotifyParametersChanged()

virtual bool CascadeWidget::WillAcceptFocus  )  [inline, virtual]
 

by default CascadeWidgets will accept input focus unless they are disabled

WillAcceptFocus() is overridden so that the default behavior for CascadeWidget derived classes is to only accept focus if they are not disabled.

Returns:
whether or not the widget will accept the focus

Reimplemented from CascadeWindow.

Reimplemented in CascadeLabelWidget, CascadePictureWidget, and CascadeVesselPanel.


Friends And Related Function Documentation

friend class CascadeApp [friend]
 

Reimplemented from CascadeWindow.


Member Data Documentation

bool CascadeWidget::m_bDisabled [protected]
 

whether or not the widget is disabled

m_bDisabled stores whether or not the widget is disabled


The documentation for this class was generated from the following file:
Generated on Sun Jul 24 14:27:22 2005 for Cascade Library by  doxygen 1.4.1