CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
CFxUIDialog Class Referenceabstract

#include <FxUIDialog.h>

Inheritance diagram for CFxUIDialog:
CFxUIObject

Public Types

enum  DialogCode { Rejected , Accepted }
 
enum  Gravity {
  Left =0x03 , CenterHorizontal =0x01 , Right =0x05 , Top =0x30 ,
  CenterVertical =0x10 , Bottom =0x50 , Center =0x11 , HorizontalMask =0x07 ,
  VerticalMask =0x70
}
 

Public Member Functions

 CFxUIDialog ()
 
 ~CFxUIDialog ()
 
virtual void setupUi ()=0
 
virtual unsigned int GetHelpId () const
 
virtual const char * GetHelpURL () const
 
CFxUIBaseViewGetLayout ()
 
virtual int exec (bool bEnableViewOperation=false)
 
void hide ()
 
CFxUIPoint mapToGlobal (CFxUIPoint &pos)
 
int minimumWidth ()
 
int minimumHeight ()
 
void move (int x, int y)
 
int maximumWidth ()
 
int maximumHeight ()
 
void raise ()
 
virtual void resizeEvent (CFxUIResizeEvent *event)
 
void setBorderWidth (float width)
 
void setBorderColor (CFxUIColor &color)
 
void setCornerRadius (float radius)
 
virtual void show ()
 
void setDragging (const bool &bDragging)
 
void setMask (const CFxUIPainterPath &path)
 
void setSizeGripEnabled (bool bEnable)
 
void setMinimumWidth (int iWidth)
 
void setMinimumHeight (int iHeight)
 
void setMaximumHeight (int iHeight)
 
void setMaximumWidth (int iWidth)
 
void setVisible (bool bVisible)
 
bool isVisible ()
 
void setResult (int iResult)
 
int result () const
 
CFxUIString windowTitle ()
 
void setWindowTitle (const CFxUIString &strTitle)
 
void openHelp ()
 
void setFloating (bool floating)
 
void setGeometry (int x, int y, int width, int height, int gravity=Gravity::Left|Gravity::Top)
 
virtual void showEvent (CFxUIShowEvent *event)
 
virtual void hideEvent (CFxUIHideEvent *event)
 
virtual void accept ()
 
virtual void reject ()
 
virtual void done (int r)
 
void resize (int w, int h)
 
void adjustSize ()
 
void adjustDialogPosition ()
 
CFxUISignal< void(void)> & accepted ()
 
CFxUISignal< void(void)> & rejected ()
 
CFxUISignal< void(int)> & finished ()
 
- Public Member Functions inherited from CFxUIObject
 CFxUIObject ()
 
virtual ~CFxUIObject ()
 
FxNativeHandle getHandle () const
 
void setHandle (FxNativeHandle handle)
 
void setParent (CFxUIObject *parent)
 
CFxUIObjectparent ()
 
const CFxUIObjectparent () const
 
void setObjectName (const CFxUIString &objectName)
 
CFxUIString objectName () const
 
bool setProperty (const char *name, const CFxUIVariant &value)
 
CFxUIVariant property (const char *name)
 
CFxUIList< CFxUIObject * > children () const
 
template<typename T>
CFxUIList< T > findChildren (const CFxUIString &name=CFxUIString())
 
void blockSignals (bool block)
 
bool signalsBlocked () const
 

Additional Inherited Members

- Protected Member Functions inherited from CFxUIObject
CFxUIObjectsender ()
 
- Protected Attributes inherited from CFxUIObject
CFxUIObjectImpl * m_pImpl
 
CFxUIObjectData * m_pData
 

Detailed Description

Class CFxUIDialog is the base class for all dialogs.

Definition at line 32 of file FxUIDialog.h.

Member Enumeration Documentation

◆ DialogCode

Description: The value returned by a modal dialog.

Enumerator
Rejected 
Accepted 

Definition at line 38 of file FxUIDialog.h.

◆ Gravity

Enumerator
Left 

Horizontally gravitate to left window border.

CenterHorizontal 

Horizontally gravitate to the center between left and right window borders.

Right 

Horizontally gravitate to right window border.

Top 

Vertically gravitate to upper window border.

CenterVertical 

Vertically gravitate to the center between upper and lower window borders.

Bottom 

Vertically gravitate to lower window border.

Center 

Gravitate to the center of the window.

HorizontalMask 

Bit mask for extracting horizontal gravity.

VerticalMask 

Bit mask for extracting vertical gravity.

Definition at line 40 of file FxUIDialog.h.

Constructor & Destructor Documentation

◆ CFxUIDialog()

CFxUIDialog::CFxUIDialog ( )

Constructor

◆ ~CFxUIDialog()

CFxUIDialog::~CFxUIDialog ( )

Destructor

Member Function Documentation

◆ accept()

virtual void CFxUIDialog::accept ( )
virtual

Hides the modal dialog and sets the result code to Accepted.

◆ accepted()

CFxUISignal< void(void)> & CFxUIDialog::accepted ( )

This signal is emitted when the dialog has been accepted either by the user

or by calling accept() or done() with the CFxUIDialog::Accepted argument.

◆ adjustDialogPosition()

void CFxUIDialog::adjustDialogPosition ( )

Adjust the position of the dialog to fit it inside the screen.

◆ adjustSize()

void CFxUIDialog::adjustSize ( )

Adjust the size of the dialog to fit it's contents.

◆ done()

virtual void CFxUIDialog::done ( int r)
virtual

Hides the modal dialog and sets the result code to r.

Parameters
rInput.

◆ exec()

virtual int CFxUIDialog::exec ( bool bEnableViewOperation = false)
virtual

Shows the dialog as modal widget.

Parameters
bEnableViewOperation- the parameter allows view modifications with pan and pinch gestures.

The parameter works only on touch platforms.

Returns
The DialogCode.

◆ finished()

CFxUISignal< void(int)> & CFxUIDialog::finished ( )

This signal is emitted when the dialog's result code has been set,

either by the user or by calling done(), accept(), or reject().

◆ GetHelpId()

virtual unsigned int CFxUIDialog::GetHelpId ( ) const
virtual

Returns help id of the dialog.

ByDefault it's value will be Zero.

Returns
The dialog's help id

◆ GetHelpURL()

virtual const char * CFxUIDialog::GetHelpURL ( ) const
virtual

Returns help URL of the dialog.

Returns
The dialog's help URL

◆ GetLayout()

CFxUIBaseView * CFxUIDialog::GetLayout ( )

Returns layout of the dialog.

Returns
The dialog's layout

◆ hide()

void CFxUIDialog::hide ( )

Hides the modal dialog.

◆ hideEvent()

virtual void CFxUIDialog::hideEvent ( CFxUIHideEvent * event)
virtual

This event handler can be reimplemented in a subclass to receive dialog hide events which are passed in the event parameter.

Hide events are sent to dialogs immediately before they are hidden.

◆ isVisible()

bool CFxUIDialog::isVisible ( )

◆ mapToGlobal()

CFxUIPoint CFxUIDialog::mapToGlobal ( CFxUIPoint & pos)

Translates the view coordinate pos to the coordinate system of parent.

Parameters
posInput

◆ maximumHeight()

int CFxUIDialog::maximumHeight ( )

Returns the maximum height of dialog.

Returns
int value.

◆ maximumWidth()

int CFxUIDialog::maximumWidth ( )

Returns the maximum width of dialog.

Returns
int value.

◆ minimumHeight()

int CFxUIDialog::minimumHeight ( )

Returns the minimum height of dialog.

Returns
int value.

◆ minimumWidth()

int CFxUIDialog::minimumWidth ( )

Returns the minimum width of dialog.

Returns
int value.

◆ move()

void CFxUIDialog::move ( int x,
int y )

Move the dialog at specified x,y coordinates.

Parameters
xInput
yInput

◆ openHelp()

void CFxUIDialog::openHelp ( )

Opens contextual help for the dialog.

◆ raise()

void CFxUIDialog::raise ( )

Raise the dialog.

◆ reject()

virtual void CFxUIDialog::reject ( )
virtual

Hides the modal dialog and sets the result code to Rejected.

◆ rejected()

CFxUISignal< void(void)> & CFxUIDialog::rejected ( )

This signal is emitted when the dialog has been rejected either by the user

or by calling reject() or done() with the CFxUIDialog::Rejected argument.

◆ resize()

void CFxUIDialog::resize ( int w,
int h )

Resize the dialog to width and height.

Parameters
wInput
hInput

◆ resizeEvent()

virtual void CFxUIDialog::resizeEvent ( CFxUIResizeEvent * event)
virtual

This event handler can be reimplemented in a subclass to receive view resize events which are passed in the event parameter.

When resizeEvent() is called, the dialog already has its new geometry.

Parameters
eventPointer to the resize event.

◆ result()

int CFxUIDialog::result ( ) const

Returns result code of the modal dialog

Returns
The DialogCode, Accepted or Rejected.

◆ setBorderColor()

void CFxUIDialog::setBorderColor ( CFxUIColor & color)

Sets the border color of dialog.

Parameters
radiusInput

◆ setBorderWidth()

void CFxUIDialog::setBorderWidth ( float width)

Sets the border width of dialog.

Parameters
radiusInput

◆ setCornerRadius()

void CFxUIDialog::setCornerRadius ( float radius)

Sets the corner radius of dialog.

Parameters
radiusInput

◆ setDragging()

void CFxUIDialog::setDragging ( const bool & bDragging)

Sets the dragging for dialog enable/disable

Parameters
bDraggingInput.

◆ setFloating()

void CFxUIDialog::setFloating ( bool floating)

A floating dialog is presented to the user as an independent window "on top" of its parent, instead of being docked.

The function works only on touch platforms.

◆ setGeometry()

void CFxUIDialog::setGeometry ( int x,
int y,
int width,
int height,
int gravity = Gravity::Left|Gravity::Top )

Specify a position and size of this dialog. The position is specified as an offset from an origin, which can be chosen from one of 9 positions of the main window (corners, edge centers, and center).

Parameters
xHorizontal offset from origin, use a negative value for spacing with Right gravity.
yVertical offset from origin, use a negative value for spacing with Bottom gravity.
widthWidth of dialog, specify -1 for default width.
heightHeight of dialog, specify -1 for default height.
gravityGravity and origin for positioning, use bitwise or of constants from enum Gravity. Default is top left.

◆ setMask()

void CFxUIDialog::setMask ( const CFxUIPainterPath & path)

Sets the mask for dialog

Parameters
CFxUIPainterPathInput.

◆ setMaximumHeight()

void CFxUIDialog::setMaximumHeight ( int iHeight)

Sets the maximum height of dialog.

Parameters
iHeightInput

◆ setMaximumWidth()

void CFxUIDialog::setMaximumWidth ( int iWidth)

Sets the maximum width of dialog.

Parameters
iWidthInput

◆ setMinimumHeight()

void CFxUIDialog::setMinimumHeight ( int iHeight)

Sets the minimum height of dialog.

Parameters
iHeightInput

◆ setMinimumWidth()

void CFxUIDialog::setMinimumWidth ( int iWidth)

Sets the minimum width of dialog.

Parameters
iWidthInput

◆ setResult()

void CFxUIDialog::setResult ( int iResult)

Sets result code of the modal dialog

Parameters
iResultInput.

◆ setSizeGripEnabled()

void CFxUIDialog::setSizeGripEnabled ( bool bEnable)

Sets the size grip for dialog enable/disable

Parameters
bEnableInput.

◆ setupUi()

virtual void CFxUIDialog::setupUi ( )
pure virtual

It will contain creation logic of all widgets in a dialog.

◆ setVisible()

void CFxUIDialog::setVisible ( bool bVisible)

Sets visibility of the modal dialog.

Parameters
bVisibleThe dialog is visible if the value of the parameter is true, otherwise it will be invisible.

◆ setWindowTitle()

void CFxUIDialog::setWindowTitle ( const CFxUIString & strTitle)

Sets title of the modal dialog

Parameters
strTitleInput.

◆ show()

virtual void CFxUIDialog::show ( )
virtual

Shows the dialog as modal less widget.

◆ showEvent()

virtual void CFxUIDialog::showEvent ( CFxUIShowEvent * event)
virtual

This event handler can be reimplemented in a subclass to receive dialog show events which are passed in the event parameter.

Show events are sent to dialogs immediately before they are shown.

◆ windowTitle()

CFxUIString CFxUIDialog::windowTitle ( )

Returns title of the modal dialog


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