FX::FXHandedInterfaceI Class Reference

#include <FXHandedInterface.h>

Inheritance diagram for FX::FXHandedInterfaceI:

Inheritance graph
[legend]

List of all members.


Detailed Description

A user handed dialog type interface with a primary button well.

Tn's dialogs coexist as popups and traditional dialogs, so this class provides the common functionality as a base class suitable for a dialog or popup with a primary button well aligned to the bottom and a side. Which side depends on the current user's handedness and so using this as a base class saves you a quantity of work. You should still test all your applications with both handedness settings (via command-line override). If you choose to add any extra buttons to the well, remember to use FX::FXWindow::userHandednessLayout() in its options if it's going into a bottom well (if side then always LAYOUT_BOTTOM too)

The layout performed by this class is not particularly intelligent - it either goes bottom-up or handedness-sideways. The well is first allocated as small as it can go in the direction of the placement but filling in the perpendicular direction and all child widgets are then given an equal division of the remaining space but all filling in the perpendicular direction. These fills are compulsory - if you want something different, insert a packer and get it to do the management. If anyone has call for improving this layout, tell me and I'll fix it but I think what I've supplied is fine for almost every possible use of this dialog.

If the remaining windows require more space than is available, the button well slides out of view. This is to enable small screen use. If you need this to happen earlier eg; your content is in a scroll area then post FXSEL(SEL_COMMAND,ID_DOCKWELL) when required.

You can also have Ok and Cancel buttons added automatically to the primary button well which also operate the apply/reset protocol (see FX::FXPrimaryButton). These buttons are automatically translated into the user's language and have suitable help texts set for them.

This class inherits FX::FXApplyResetList for you and points the messages at that - so all you have to do is add your apply/reset capable widgets to the list via addApplyReset(). Furthermore by default FXHandedInterface's message handlers issue an apply after a SEL_COMMAND from an Ok button so for most cases, you can just create your child widgets and everything else is taken care of for you.

Note:
Under Tn, you are NOT permitted to create a modal dialog so execute() isn't present. If you must use modal dialogs consider using FX::FXHandedMsgBox.

Public Member Functions

FXPackerbuttonWell () const throw ()
FXPrimaryButtonokButton () const throw ()
FXPrimaryButtoncancelButton () const throw ()
bool isButtonWellDocked () const throw ()

Protected Types

enum  {
  ID_CANCEL, ID_ACCEPT, ID_BUTTONWELL, ID_DOCKWELL,
  ID_UNDOCKWELL, ID_CHOICE, ID_LAST
}

Protected Member Functions

long onCmdChoice (FXObject *, FXSelector, void *)
long onButtonWell (FXObject *, FXSelector, void *)
long onCmdDockWell (FXObject *, FXSelector, void *)
long onCmdUndockWell (FXObject *, FXSelector, void *)
long onConfigure (FXObject *, FXSelector, void *)
 FXHandedInterfaceI (FXApplyResetList *arl, FXShell *window, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING)
 FXHandedInterfaceI (FXApplyResetList *arl, FXShell *window, FXHandedInterfaceI &o)
FXint getDefaultWidth ()
FXint getDefaultHeight ()
void layout ()

Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
ID_CANCEL  Send to cancel the interface.
ID_ACCEPT  Send to accept the interface.
ID_DOCKWELL  Send to dock the button well.
ID_UNDOCKWELL  Send to undock the button well.


Member Function Documentation

FXPacker* FX::FXHandedInterfaceI::buttonWell (  )  const throw ()

Returns the button well.

FXPrimaryButton* FX::FXHandedInterfaceI::okButton (  )  const throw ()

Returns the Ok button.

FXPrimaryButton* FX::FXHandedInterfaceI::cancelButton (  )  const throw ()

Returns the Cancel button.

bool FX::FXHandedInterfaceI::isButtonWellDocked (  )  const throw ()

Returns true if the well is docked.


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:00:37 2008 for TnFOX by doxygen v1.5.6