CFx SDK Documentation  2020SP3
Public Types | Public Member Functions | List of all members
CFxUIFocusEvent Class Reference

#include <FxUIEvent.h>

Inheritance diagram for CFxUIFocusEvent:
CFxUIEvent

Public Types

enum  FocusReason {
  MouseFocusReason, TabFocusReason, BacktabFocusReason, ActiveWindowFocusReason,
  PopupFocusReason, ShortcutFocusReason, MenuBarFocusReason, OtherFocusReason,
  NoFocusReason
}
 
- Public Types inherited from CFxUIEvent
enum  Type {
  None = 0, FocusIn = 8, FocusOut = 9, Paint = 12,
  Resize = 14, Show = 17, Hide = 18
}
 

Public Member Functions

 CFxUIFocusEvent (Type type, FocusReason reason=OtherFocusReason)
 
 ~CFxUIFocusEvent ()
 
bool gotFocus () const
 
bool lostFocus () const
 
FocusReason reason () const
 
- Public Member Functions inherited from CFxUIEvent
 CFxUIEvent (Type type)
 
virtual ~CFxUIEvent ()
 
Type type () const
 

Additional Inherited Members

- Protected Attributes inherited from CFxUIEvent
ushort t
 

Detailed Description

Class CFxUIFocusEvent provides an event occurred when a widget's focus is changed.

Definition at line 170 of file FxUIEvent.h.

Member Enumeration Documentation

◆ FocusReason

This enum type specifies why the focus changed.

Enumerator
MouseFocusReason 

A mouse action occurred.

TabFocusReason 

Tab key is pressed.

BacktabFocusReason 

Back Tab key is pressed.

ActiveWindowFocusReason 

Either window active or inactive.

PopupFocusReason 

The application opened/closed a pop-up that grabbed/released the keyboard focus.

ShortcutFocusReason 

The user typed a label's buddy shortcut.

MenuBarFocusReason 

The menu bar took focus.

OtherFocusReason 

Another reason, usually application-specific.

NoFocusReason 

Definition at line 176 of file FxUIEvent.h.

Constructor & Destructor Documentation

◆ CFxUIFocusEvent()

CFxUIFocusEvent::CFxUIFocusEvent ( Type  type,
FocusReason  reason = OtherFocusReason 
)
explicit

Constructor.

Parameters
typeInput.
reasonInput.

◆ ~CFxUIFocusEvent()

CFxUIFocusEvent::~CFxUIFocusEvent ( )

Destructor

Member Function Documentation

◆ gotFocus()

bool CFxUIFocusEvent::gotFocus ( ) const
inline

Returns if widget have focus.

Returns
If the widget have focus then return value will be true otherwise _false.

Definition at line 205 of file FxUIEvent.h.

◆ lostFocus()

bool CFxUIFocusEvent::lostFocus ( ) const
inline

Returns if widget does not have focus.

Returns
If the widget does not have focus then return value will be true otherwise _false.

Definition at line 212 of file FxUIEvent.h.

◆ reason()

FocusReason CFxUIFocusEvent::reason ( ) const

Returns FocusReason of a widget.

Returns
FocusReason.

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