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

button.cpp File Reference

#include <string.h>
#include <stdlib.h>
#include <os2win.h>
#include "controls.h"
#include "button.h"
#include <misc.h>
#include "initterm.h"
#include "syscolor.h"
#include "dbglocal.h"

Include dependency graph for button.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define DBG_LOCALLOG   DBG_button
#define MAX_BTN_TYPE   12
#define PAINT_BUTTON(hwnd, style, action)
#define BUTTON_SEND_CTLCOLOR(hwnd, hdc)

Typedefs

typedef void(* pfPaint )(HWND hwnd, HDC hdc, WORD action)

Functions

void DrawDisabledText (HDC hdc, char *text, RECT *rtext, UINT format)
void PB_Paint (HWND hwnd, HDC hDC, WORD action)
void CB_Paint (HWND hwnd, HDC hDC, WORD action)
void GB_Paint (HWND hwnd, HDC hDC, WORD action)
void UB_Paint (HWND hwnd, HDC hDC, WORD action)
void OB_Paint (HWND hwnd, HDC hDC, WORD action)
void BUTTON_CheckAutoRadioButton (HWND hwnd)
void BUTTON_DrawPushButton (HWND hwnd, HDC hDC, WORD action, BOOL pushedState)
LRESULT BUTTON_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SendNotify (HWND hwnd, DWORD code)
LRESULT BUTTON_GetDlgCode (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_Enable (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_EraseBkgnd (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_Paint (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_LButtonDblClk (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_CaptureChanged (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_NCHitTest (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SetText (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_GetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_KeyDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_KeyUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SysKeyUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SetFocus (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_KillFocus (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SysColorChange (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_Click (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SetStyle (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SetImage (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_GetImage (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_GetCheck (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SetCheck (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_GetState (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT BUTTON_SetState (HWND hwnd, WPARAM wParam, LPARAM lParam)
LRESULT WINAPI ButtonWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
INT BUTTON_GetTextFormat (DWORD dwStyle, DWORD dwExStyle, INT defHorz, INT defVert)
BOOL BUTTON_Register ()
BOOL BUTTON_Unregister ()

Variables

const WORD maxCheckState [12]
const pfPaint btnPaintFunc [12]
HBITMAP hbitmapCheckBoxes = 0
WORD checkBoxWidth = 0
WORD checkBoxHeight = 0


Define Documentation

#define DBG_LOCALLOG   DBG_button
 

Definition at line 25 of file button.cpp.

#define MAX_BTN_TYPE   12
 

Definition at line 45 of file button.cpp.

#define PAINT_BUTTON hwnd,
style,
action   
 

Value:

if (btnPaintFunc[style] && IsWindowVisible(hwnd) ) { \
         HDC hdc = GetDC(hwnd); \
         (btnPaintFunc[style])(hwnd,hdc,action); \
         ReleaseDC(hwnd,hdc); }

Definition at line 89 of file button.cpp.

Referenced by BUTTON_KillFocus(), BUTTON_SetCheck(), BUTTON_SetFocus(), BUTTON_SetFont(), BUTTON_SetState(), BUTTON_SetStyle(), and BUTTON_SetText().

#define BUTTON_SEND_CTLCOLOR hwnd,
hdc   
 

Value:

SendMessageA( GetParent(hwnd), WM_CTLCOLORBTN, \
                    (hdc),hwnd)

Definition at line 95 of file button.cpp.

Referenced by BUTTON_DrawPushButton().


Typedef Documentation

typedef void(* pfPaint)(HWND hwnd,HDC hdc,WORD action)
 

Definition at line 63 of file button.cpp.


Function Documentation

void DrawDisabledText HDC    hdc,
char *    text,
RECT *    rtext,
UINT    format
[static]
 

Definition at line 977 of file button.cpp.

Referenced by BUTTON_DrawPushButton(), CB_Paint(), and GB_Paint().

void PB_Paint HWND    hwnd,
HDC    hDC,
WORD    action
[static]
 

Definition at line 759 of file button.cpp.

void CB_Paint HWND    hwnd,
HDC    hDC,
WORD    action
[static]
 

Definition at line 997 of file button.cpp.

void GB_Paint HWND    hwnd,
HDC    hDC,
WORD    action
[static]
 

Definition at line 1147 of file button.cpp.

void UB_Paint HWND    hwnd,
HDC    hDC,
WORD    action
[static]
 

Definition at line 1201 of file button.cpp.

void OB_Paint HWND    hwnd,
HDC    hDC,
WORD    action
[static]
 

Definition at line 1228 of file button.cpp.

void BUTTON_CheckAutoRadioButton HWND    hwnd [static]
 

Definition at line 1120 of file button.cpp.

Referenced by BUTTON_SetCheck().

void BUTTON_DrawPushButton HWND    hwnd,
HDC    hDC,
WORD    action,
BOOL    pushedState
[static]
 

Definition at line 797 of file button.cpp.

Referenced by CB_Paint(), and PB_Paint().

LRESULT BUTTON_LButtonDown HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 228 of file button.cpp.

Referenced by BUTTON_LButtonDblClk(), and ButtonWndProc().

LRESULT BUTTON_SendNotify HWND    hwnd,
DWORD    code
[static]
 

Definition at line 102 of file button.cpp.

Referenced by BUTTON_KeyUp(), BUTTON_KillFocus(), BUTTON_LButtonDblClk(), BUTTON_LButtonUp(), and BUTTON_SetFocus().

LRESULT BUTTON_GetDlgCode HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 107 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_Enable HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 135 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_Create HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 148 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_Destroy HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 176 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_EraseBkgnd HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 185 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_Paint HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 195 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_LButtonDblClk HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 215 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_LButtonUp HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 245 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_CaptureChanged HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 290 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_MouseMove HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 307 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_NCHitTest HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 324 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SetText HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 333 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SetFont HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 372 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_GetFont HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 411 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_KeyDown HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 418 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_KeyUp HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 431 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SysKeyUp HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 463 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SetFocus HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 470 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_KillFocus HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 493 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SysColorChange HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 510 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_Click HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 517 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SetStyle HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 531 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SetImage HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 547 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_GetImage HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 562 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_GetCheck HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 577 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SetCheck HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 584 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_GetState HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 624 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT BUTTON_SetState HWND    hwnd,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 631 of file button.cpp.

Referenced by ButtonWndProc().

LRESULT WINAPI ButtonWndProc HWND    hwnd,
UINT    uMsg,
WPARAM    wParam,
LPARAM    lParam
[static]
 

Definition at line 654 of file button.cpp.

INT BUTTON_GetTextFormat DWORD    dwStyle,
DWORD    dwExStyle,
INT    defHorz,
INT    defVert
[static]
 

Definition at line 774 of file button.cpp.

Referenced by BUTTON_DrawPushButton(), CB_Paint(), and GB_Paint().

BOOL BUTTON_Register  
 

Definition at line 1253 of file button.cpp.

Referenced by CONTROLS_Register().

BOOL BUTTON_Unregister  
 

Definition at line 1272 of file button.cpp.

Referenced by CONTROLS_Unregister().


Variable Documentation

const WORD maxCheckState[ 12 ] [static]
 

Initial value:

{
    BUTTON_UNCHECKED,   
    BUTTON_UNCHECKED,   
    BUTTON_CHECKED,     
    BUTTON_CHECKED,     
    BUTTON_CHECKED,     
    BUTTON_3STATE,      
    BUTTON_3STATE,      
    BUTTON_UNCHECKED,   
    BUTTON_UNCHECKED,   
    BUTTON_CHECKED,     
    BUTTON_UNCHECKED,   
    BUTTON_UNCHECKED    
}

Definition at line 47 of file button.cpp.

const pfPaint btnPaintFunc[ 12 ] [static]
 

Initial value:

Definition at line 65 of file button.cpp.

HBITMAP hbitmapCheckBoxes = 0 [static]
 

Definition at line 99 of file button.cpp.

WORD checkBoxWidth = 0 [static]
 

Definition at line 100 of file button.cpp.

WORD checkBoxHeight = 0 [static]
 

Definition at line 100 of file button.cpp.


Generated on Wed Jan 23 23:17:58 2002 for ODIN-user32 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001