// Revision: 54 1.6.1.3 source/ui/basectl/icombobx.hpp, listctls, ioc.v400, 980918 
#ifndef _ICOMBOBX_HPP
#define _ICOMBOBX_HPP
/*******************************************************************************
* FILE NAME: icombobx.hpp                                                      *
*                                                                              *
* DESCRIPTION:                                                                 *
*   Declaration of the classes:                                                *
*     IComboBox                                                                *
*                                                                              *
* COPYRIGHT:                                                                   *
*   IBM Open Class Library                                                     *
*   Licensed Material - Property of IBM                                        *
*   (C) Copyright IBM Corp. 1992, 1997  All Rights Reserved.                   *
*                                                                              *
*******************************************************************************/
#include <icombobs.hpp>
#include <ientryfd.hpp>
#include <irect.hpp>

#if __IBMCPP__ >= 400
#pragma namemangling(compat)
#endif

class IComboBoxData;

#pragma enum(4)
#pragma pack(push,4)

class IComboBox : public IBaseComboBox {
typedef IBaseComboBox
  Inherited;

public:

typedef IBaseComboBox::Cursor
  Cursor;

class Style;
/*------------------------------- Constructors -------------------------------*/
  IComboBox         ( unsigned long        id,
                      IWindow*             parent,
                      IWindow*             owner,
                      const IRectangle&    initial = IRectangle  ( ),
                      const Style&         style   = defaultStyle( ) );

#ifdef IC_PMWIN
  IComboBox         ( unsigned long        id,
                      IWindow*             parent );

  IComboBox         ( const IWindowHandle& handle);
#endif

virtual
 ~IComboBox         ( );

/*---------------------------------- Styles ----------------------------------*/
INESTEDBITFLAGCLASSDEF3(Style, IComboBox, IWindow, IControl, IBaseComboBox);

static const Style
  IC_IMPORTU classDefaultStyle;

static Style
  defaultStyle      ( );

static void
  setDefaultStyle   ( const Style&       style );

/*------------------------- Add Items ----------------------------------------*/
virtual unsigned long
  add               ( unsigned long      index,
                      const char*        text ),
  add               ( unsigned long      index,
                      const char* const* itemList,
                      unsigned long      count = 1 ),
  addAsFirst        ( const char*        text ),
  addAsLast         ( const char*        text ),
  addAscending      ( const char*        text ),
  addDescending     ( const char*        text ),
  add               ( unsigned long      index,
                      const IResourceId& item ),
  addAsFirst        ( const IResourceId& item ),
  addAsLast         ( const IResourceId& item ),
  addAscending      ( const IResourceId& item ),
  addDescending     ( const IResourceId& item );

virtual IComboBox
 &add               ( const char*        text,
                      Cursor&            cursor ),
 &add               ( const IResourceId& item,
                      Cursor&            cursor ),
 &addAsFirst        ( const char*        text,
                      Cursor&            cursor ),
 &addAsLast         ( const char*        text,
                      Cursor&            cursor ),
 &addAsNext         ( const char*        text,
                      Cursor&            cursor ),
 &addAsFirst        ( const IResourceId& item,
                      Cursor&            cursor),
 &addAsLast         ( const IResourceId& item,
                      Cursor&            cursor ),
 &addAsNext         ( const IResourceId& item,
                      Cursor&            cursor );

/*------------------------- Remove and Replace Items -------------------------*/
virtual IComboBox
 &removeAt          ( Cursor&            cursor ),
 &removeAll         ( ),
 &replaceAt         ( const char*        text,
                      const Cursor&      cursor ),
 &replaceAt         ( const IResourceId& item,
                      const Cursor&      cursor );

virtual unsigned long
  remove            ( unsigned long      index );

/*--------------------------- Notification Members ---------------------------*/
static INotificationId const
  IC_IMPORTU addId,
  IC_IMPORTU removeId;

private:
/*------------------------------ Hidden Members ------------------------------*/
  IComboBox         ( const IComboBox&   comboBox );
IComboBox
 &operator=         ( const IComboBox&   comboBox );

/*--------------------------------- Private ----------------------------------*/
friend class IBaseComboBox::Cursor;

static Style
  currentDefaultStyle;

IComboBoxData
 *fComboBoxData;

};  /* IComboBox */

INESTEDBITFLAGCLASSFUNCS(Style, IComboBox)

#pragma pack(pop)
#pragma enum(pop)

#if __IBMCPP__ >= 400
#pragma namemangling()
#endif

#endif // _ICOMBOBX_HPP
