My Project
Public Member Functions | List of all members
Button Class Reference

Button interface class Provide interface for creating/removing button. More...

#include "interface/button.h"

Inheritance diagram for Button:
Inheritance graph
[legend]
Collaboration diagram for Button:
Collaboration graph
[legend]

Public Member Functions

 Button ()
 
 Button (int ID)
 
 Button (int X, int Y, int HEIGHT, int WIDTH, WCHAR *TEXT=NULL)
 
 ~Button ()
 
HWND create (int X, int Y, int HEIGHT, int WIDTH, WCHAR *TEXT) override
 
LRESULT setImage (int rID)
 
HWND getHWND ()
 
void remove () override
 
- Public Member Functions inherited from BaseInterfaceCtrl
 BaseInterfaceCtrl ()
 
 BaseInterfaceCtrl (HWND hWnd, HINSTANCE hInst)
 
 ~BaseInterfaceCtrl ()
 

Additional Inherited Members

- Static Protected Attributes inherited from BaseInterfaceCtrl
static HWND hWnd
 
static HINSTANCE hInst
 

Detailed Description

Button interface class Provide interface for creating/removing button.

Todo:
Customise button style

Definition at line 24 of file button.h.

Constructor & Destructor Documentation

§ Button() [1/3]

Button::Button ( )

Empty constructor. No action.

Definition at line 5 of file button.cpp.

§ Button() [2/3]

Button::Button ( int  ID)

Constructor sets ID in 'id' variable

Parameters
[in]IDUnique identify of button

Definition at line 10 of file button.cpp.

§ Button() [3/3]

Button::Button ( int  X,
int  Y,
int  HEIGHT,
int  WIDTH,
WCHAR *  TEXT = NULL 
)

Constructor create and display button

Parameters
[in]XX coordinate
[in]YY coordinate
[in]HEIGHTHeight of the window
[in]WIDTHWidth of the window
[in]TEXTText which is displaying on element

Definition at line 15 of file button.cpp.

Here is the call graph for this function:

§ ~Button()

Button::~Button ( )

Destructor. Removes button (Does not free memory)

Definition at line 20 of file button.cpp.

Member Function Documentation

§ create()

HWND Button::create ( int  X,
int  Y,
int  HEIGHT,
int  WIDTH,
WCHAR *  TEXT 
)
overridevirtual

Create and display button

Parameters
[in]XX coordinate
[in]YY coordinate
[in]HEIGHTHeight of the window
[in]WIDTHWidth of the window
[in]TEXTText which is displaying on element
Returns
HWND of created window

Implements BaseInterfaceCtrl.

Definition at line 25 of file button.cpp.

Here is the caller graph for this function:

§ getHWND()

HWND Button::getHWND ( )

Definition at line 44 of file button.cpp.

Here is the caller graph for this function:

§ remove()

void Button::remove ( )
overridevirtual

Removes button (Does not free memory)

Implements BaseInterfaceCtrl.

Definition at line 49 of file button.cpp.

§ setImage()

LRESULT Button::setImage ( int  rID)

Set image on button

Parameters
[in]rIDResourse ID (in resource.h)
Returns
Value specifies the result of the message processing

Definition at line 38 of file button.cpp.

Here is the caller graph for this function:

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