Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXChoiceBox Class Reference

The Choice Box provides a dialog panel to select one item out of a list of choices. More...

#include <FXChoiceBox.h>

Inheritance diagram for FX::FXChoiceBox:

FX::FXDialogBox FX::FXTopWindow FX::FXShell FX::FXComposite FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject List of all members.

Public Types

enum  {
  ID_CLICKED = FXDialogBox::ID_LAST,
  ID_LAST
}

Public Member Functions

 FXChoiceBox (FXWindow *owner, const FXString &caption, const FXString &text, FXIcon *icon, const FXchar **choices, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 FXChoiceBox (FXWindow *owner, const FXString &caption, const FXString &text, FXIcon *icon, const FXString &choices, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 FXChoiceBox (FXApp *app, const FXString &caption, const FXString &text, FXIcon *icon, const FXchar **choices, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 FXChoiceBox (FXApp *app, const FXString &caption, const FXString &text, FXIcon *icon, const FXString &choices, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXChoiceBox ()

Static Public Member Functions

static FXint ask (FXWindow *owner, FXuint opts, const FXString &caption, const FXString &text, FXIcon *icon, const FXchar **choices)
static FXint ask (FXWindow *owner, FXuint opts, const FXString &caption, const FXString &text, FXIcon *icon, const FXString &choices)
static FXint ask (FXApp *app, FXuint opts, const FXString &caption, const FXString &text, FXIcon *icon, const FXchar **choices)
static FXint ask (FXApp *app, FXuint opts, const FXString &caption, const FXString &text, FXIcon *icon, const FXString &choices)

Detailed Description

The Choice Box provides a dialog panel to select one item out of a list of choices.

The choices are provided as a list of text strings. When the dialog closes, the index of the selected choice is returned, while a -1 is returned if the dialog was canceled,


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
ID_CLICKED 
ID_LAST 


Constructor & Destructor Documentation

FX::FXChoiceBox::FXChoiceBox FXWindow owner,
const FXString caption,
const FXString text,
FXIcon icon,
const FXchar **  choices,
FXuint  opts = 0,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0
 

Construct choice box with given caption, icon, message text, and with choices from array of strings.

FX::FXChoiceBox::FXChoiceBox FXWindow owner,
const FXString caption,
const FXString text,
FXIcon icon,
const FXString choices,
FXuint  opts = 0,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0
 

Construct choice box with given caption, icon, message text, and with choices from newline separated strings.

FX::FXChoiceBox::FXChoiceBox FXApp app,
const FXString caption,
const FXString text,
FXIcon icon,
const FXchar **  choices,
FXuint  opts = 0,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0
 

Construct free floating choice box with given caption, icon, message text, and with choices from array of strings.

FX::FXChoiceBox::FXChoiceBox FXApp app,
const FXString caption,
const FXString text,
FXIcon icon,
const FXString choices,
FXuint  opts = 0,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0
 

Construct free floating choice box with given caption, icon, message text, and with choices from newline separated strings.

virtual FX::FXChoiceBox::~FXChoiceBox  )  [virtual]
 

Destroy choice box.


Member Function Documentation

static FXint FX::FXChoiceBox::ask FXWindow owner,
FXuint  opts,
const FXString caption,
const FXString text,
FXIcon icon,
const FXchar **  choices
[static]
 

Show a modal choice dialog.

Prompt the user using a dialog with given caption, icon, message text, and with choices from newline array of strings. The return value is -1 if cancelled, or the given choice.

static FXint FX::FXChoiceBox::ask FXWindow owner,
FXuint  opts,
const FXString caption,
const FXString text,
FXIcon icon,
const FXString choices
[static]
 

Show a modal choice dialog.

Prompt the user using a dialog with given caption, icon, message text, and with choices from newline separated strings. The return value is -1 if cancelled, or the given choice

static FXint FX::FXChoiceBox::ask FXApp app,
FXuint  opts,
const FXString caption,
const FXString text,
FXIcon icon,
const FXchar **  choices
[static]
 

Show modal choice message, in free floating window.

Prompt the user using a dialog with given caption, icon, message text, and with choices from newline array of strings. The return value is -1 if cancelled, or the given choice

static FXint FX::FXChoiceBox::ask FXApp app,
FXuint  opts,
const FXString caption,
const FXString text,
FXIcon icon,
const FXString choices
[static]
 

Show modal choice message, in free floating window.

Prompt the user using a dialog with given caption, icon, message text, and with choices from newline separated strings. The return value is -1 if cancelled, or the given choice

virtual void FX::FXChoiceBox::save FXStream store  )  const [virtual]
 

Save choice box to a stream.

Reimplemented from FX::FXTopWindow.

virtual void FX::FXChoiceBox::load FXStream store  )  [virtual]
 

Load choice box from a stream.

Reimplemented from FX::FXTopWindow.

Copyright © 1997-2005 Jeroen van der Zijp