QTools  6.5.0
qwin_gui.h File Reference

QWIN GUI facilities for building realistic embedded front panels. More...

#include <windows.h>

Go to the source code of this file.

Data Structures

struct  OwnerDrawnButton
 
struct  GraphicDisplay
 
struct  SegmentDisplay
 

Macros

#define WIN32_LEAN_AND_MEAN
 
#define GraphicDisplay_setPixel(me_, x_, y_, color_)
 
#define GraphicDisplay_clearPixel(me_, x_, y_)
 

Enumerations

enum  OwnerDrawnButtonAction { BTN_NOACTION, BTN_PAINTED, BTN_DEPRESSED, BTN_RELEASED }
 

Functions

HWND CreateCustDialog (HINSTANCE hInst, int iDlg, HWND hParent, WNDPROC lpfnWndProc, LPCTSTR lpWndClass)
 
void OwnerDrawnButton_init (OwnerDrawnButton *const me, UINT itemID, HBITMAP hBitmapUp, HBITMAP hBitmapDwn, HCURSOR hCursor)
 
void OwnerDrawnButton_xtor (OwnerDrawnButton *const me)
 
enum OwnerDrawnButtonAction OwnerDrawnButton_draw (OwnerDrawnButton *const me, LPDRAWITEMSTRUCT lpdis)
 
void OwnerDrawnButton_set (OwnerDrawnButton *const me, int isDepressed)
 
BOOL OwnerDrawnButton_isDepressed (OwnerDrawnButton const *const me)
 
void GraphicDisplay_init (GraphicDisplay *const me, UINT width, UINT height, UINT itemID, BYTE const bgColor[3])
 
void GraphicDisplay_xtor (GraphicDisplay *const me)
 
void GraphicDisplay_clear (GraphicDisplay *const me)
 
void GraphicDisplay_redraw (GraphicDisplay *const me)
 
void SegmentDisplay_init (SegmentDisplay *const me, UINT segNum, UINT bitmapNum)
 
void SegmentDisplay_xtor (SegmentDisplay *const me)
 
BOOL SegmentDisplay_initSegment (SegmentDisplay *const me, UINT segmentNum, UINT segmentID)
 
BOOL SegmentDisplay_initBitmap (SegmentDisplay *const me, UINT bitmapNum, HBITMAP hBitmap)
 
BOOL SegmentDisplay_setSegment (SegmentDisplay *const me, UINT segmentNum, UINT bitmapNum)
 
void DrawBitmap (HDC hdc, HBITMAP hBitmap, int xStart, int yStart)
 

Detailed Description

QWIN GUI facilities for building realistic embedded front panels.

Definition in file qwin_gui.h.


Data Structure Documentation

◆ OwnerDrawnButton

struct OwnerDrawnButton

Definition at line 59 of file qwin_gui.h.

Data Fields
UINT itemID
HBITMAP hBitmapUp
HBITMAP hBitmapDown
HCURSOR hCursor
int isDepressed

◆ GraphicDisplay

struct GraphicDisplay

Definition at line 89 of file qwin_gui.h.

Data Fields
HDC src_hDC
int src_width
int src_height
HDC dst_hDC
int dst_width
int dst_height
HWND hItem
HBITMAP hBitmap
BYTE * bits
BYTE bgColor[3]

◆ SegmentDisplay

struct SegmentDisplay

Definition at line 125 of file qwin_gui.h.

Data Fields
HWND * hSegment
UINT segmentNum
HBITMAP * hBitmap
UINT bitmapNum

Macro Definition Documentation

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 47 of file qwin_gui.h.

◆ GraphicDisplay_setPixel

#define GraphicDisplay_setPixel (   me_,
  x_,
  y_,
  color_ 
)
Value:
do { \
BYTE *pixelRGB = &(me_)->bits[3*((x_) \
+ (me_)->src_width * ((me_)->src_height - 1U - (y_)))]; \
pixelRGB[0] = (color_)[0]; \
pixelRGB[1] = (color_)[1]; \
pixelRGB[2] = (color_)[2]; \
} while (0)

Definition at line 108 of file qwin_gui.h.

◆ GraphicDisplay_clearPixel

#define GraphicDisplay_clearPixel (   me_,
  x_,
  y_ 
)
Value:
do { \
BYTE *pixelRGB = &(me_)->bits[3*((x_) \
+ (me_)->src_width * ((me_)->src_height - 1U - (y_)))]; \
pixelRGB[0] = (me_)->bgColor[0]; \
pixelRGB[1] = (me_)->bgColor[1]; \
pixelRGB[2] = (me_)->bgColor[2]; \
} while (0)

Definition at line 116 of file qwin_gui.h.

Enumeration Type Documentation

◆ OwnerDrawnButtonAction

Enumerator
BTN_NOACTION 
BTN_PAINTED 
BTN_DEPRESSED 
BTN_RELEASED 

Definition at line 67 of file qwin_gui.h.

Function Documentation

◆ CreateCustDialog()

HWND CreateCustDialog ( HINSTANCE  hInst,
int  iDlg,
HWND  hParent,
WNDPROC  lpfnWndProc,
LPCTSTR  lpWndClass 
)

Definition at line 47 of file qwin_gui.c.

◆ OwnerDrawnButton_init()

void OwnerDrawnButton_init ( OwnerDrawnButton *const  me,
UINT  itemID,
HBITMAP  hBitmapUp,
HBITMAP  hBitmapDwn,
HCURSOR  hCursor 
)

Definition at line 81 of file qwin_gui.c.

◆ OwnerDrawnButton_xtor()

void OwnerDrawnButton_xtor ( OwnerDrawnButton *const  me)

Definition at line 93 of file qwin_gui.c.

◆ OwnerDrawnButton_draw()

enum OwnerDrawnButtonAction OwnerDrawnButton_draw ( OwnerDrawnButton *const  me,
LPDRAWITEMSTRUCT  lpdis 
)

Definition at line 99 of file qwin_gui.c.

◆ OwnerDrawnButton_set()

void OwnerDrawnButton_set ( OwnerDrawnButton *const  me,
int  isDepressed 
)

Definition at line 134 of file qwin_gui.c.

◆ OwnerDrawnButton_isDepressed()

BOOL OwnerDrawnButton_isDepressed ( OwnerDrawnButton const *const  me)

Definition at line 147 of file qwin_gui.c.

◆ GraphicDisplay_init()

void GraphicDisplay_init ( GraphicDisplay *const  me,
UINT  width,
UINT  height,
UINT  itemID,
BYTE const  bgColor[3] 
)

Definition at line 152 of file qwin_gui.c.

◆ GraphicDisplay_xtor()

void GraphicDisplay_xtor ( GraphicDisplay *const  me)

Definition at line 188 of file qwin_gui.c.

◆ GraphicDisplay_clear()

void GraphicDisplay_clear ( GraphicDisplay *const  me)

Definition at line 194 of file qwin_gui.c.

◆ GraphicDisplay_redraw()

void GraphicDisplay_redraw ( GraphicDisplay *const  me)

Definition at line 208 of file qwin_gui.c.

◆ SegmentDisplay_init()

void SegmentDisplay_init ( SegmentDisplay *const  me,
UINT  segNum,
UINT  bitmapNum 
)

Definition at line 214 of file qwin_gui.c.

◆ SegmentDisplay_xtor()

void SegmentDisplay_xtor ( SegmentDisplay *const  me)

Definition at line 231 of file qwin_gui.c.

◆ SegmentDisplay_initSegment()

BOOL SegmentDisplay_initSegment ( SegmentDisplay *const  me,
UINT  segmentNum,
UINT  segmentID 
)

Definition at line 245 of file qwin_gui.c.

◆ SegmentDisplay_initBitmap()

BOOL SegmentDisplay_initBitmap ( SegmentDisplay *const  me,
UINT  bitmapNum,
HBITMAP  hBitmap 
)

Definition at line 257 of file qwin_gui.c.

◆ SegmentDisplay_setSegment()

BOOL SegmentDisplay_setSegment ( SegmentDisplay *const  me,
UINT  segmentNum,
UINT  bitmapNum 
)

Definition at line 269 of file qwin_gui.c.

◆ DrawBitmap()

void DrawBitmap ( HDC  hdc,
HBITMAP  hBitmap,
int  xStart,
int  yStart 
)

Definition at line 287 of file qwin_gui.c.