/******************************************************************************
FILE:  WB_RGBCtl.h

SERVICES:  CRGBCtl Custom Control

GENERAL DESCRIPTION:
  This is a custom control which is used to select a numeric value between 0 
  and 255.  It is used by the WhiteBoard application to allow users to 
  specify Red, Green and Blue color values for drawing shapes.

  The control behaves like an IListCtl, Showing a single selected
  entry at a time.  Pressing the Up and Down keys increases or decreases
  the numeric value.  Pressing the Left or Right keys causes an EVT_CTL_TAB
  event to be posted.  The primary difference between this control and 
  a IMenuCtl is that a seperate menu item does not need to be created
  for each of the 256 possible color values.  This provides a significant
  memory savings.

  The CRGBCtl allows the user to enter two different color values, one 
  for the fill color and the other the border color.  Which value the
  control displays depends on the value passed to the CRGBCtl_SetMode
  function.

  This is NOT a true BREW control.  It simply uses an interface that makes 
  it behave like one.  The primary difference between this control 
  and true BREW controls is that this control is not derived from IControl.
  Therefore, special handling is occasionally required when using this control.


PUBLIC CLASSES AND STATIC FUNCTIONS:
	Classes:
    IDisplay

INITIALIZATION & SEQUENCING REQUIREMENTS:

	See Exported Routines

       Copyright © 2002 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
******************************************************************************/
#ifndef WB_RGBCtl_H
#define WB_RGBCtl_H

//*****************************************************************************
// INCLUDE FILES
//*****************************************************************************

#include "AEE.h"

//*****************************************************************************
// DATA STRUCTURE DEFINITIONS
//*****************************************************************************

typedef struct
{
  boolean     m_bIsActive;
  boolean     m_bIsBorderMode;
  uint8       m_nBorderValue;
  uint8       m_nFillValue;
  AEERect     m_rRect;

} CRGBCtl;

//*****************************************************************************
// FUNCTION DECLARATIONS
//*****************************************************************************

extern CRGBCtl* CRGBCtl_CreateInstance( void );
extern void CRGBCtl_SetRect( CRGBCtl* pCtl, AEERect* pRect );
extern void CRGBCtl_GetRect( CRGBCtl* pCtl, AEERect* pRect );
extern uint8 CRGBCtl_GetBorderValue( CRGBCtl* pCtl );
extern uint8 CRGBCtl_GetFillValue( CRGBCtl* pCtl );
extern void CRGBCtl_SetMode( CRGBCtl* pCtl, boolean bIsBorderMode );
extern boolean CRGBCtl_GetMode( CRGBCtl* pCtl );
extern void CRGBCtl_Redraw( CRGBCtl* pCtl );
extern void CRGBCtl_SetActive( CRGBCtl* pCtl, boolean bIsActive );
extern boolean CRGBCtl_IsActive( CRGBCtl* pCtl );
extern boolean CRGBCtl_HandleEvent( CRGBCtl* pCtl, AEEEvent eCode, uint16 wParam, uint32 dwParam );
extern void CRGBCtl_Release( CRGBCtl* pCtl );

#endif
