LMMS
Loading...
Searching...
No Matches
swell-wnd-generic.cpp File Reference
#include "swell.h"
#include "swell-internal.h"
#include <math.h>
#include "../mutex.h"
#include "../ptrlist.h"
#include "../assocarray.h"
#include "../queue.h"
#include "../wdlcstring.h"
#include "../wdlutf8.h"
#include "swell-dlggen.h"

Classes

struct  TimerInfoRec
struct  buttonWindowState
struct  __SWELL_editControlState
struct  __SWELL_ComboBoxInternalState_rec
class  __SWELL_ComboBoxInternalState
struct  SWELL_ListView_Col
struct  listViewState
struct  treeViewState
struct  tabControlState
struct  ccprocrec
struct  PMQ_rec

Macros

#define WDL_NO_DEFINE_MINMAX
#define SWELL_INTERNAL_MERGESORT_IMPL
#define SWELL_INTERNAL_HTREEITEM_IMPL
#define STATEIMAGEMASKTOINDEX(x)
#define ACTIONTARGET   (m_make_owner)
#define TRANSFORMFONTSIZE   ((m_transform.right/65536.0+1.0)*3.7)
#define EDIT_ALLOW_MULTILINE_CACHE(wwrap, hwnd, tlen)
#define TABCONTROL_HEIGHT   SWELL_UI_SCALE(20)
#define MENUBAR_SELECTED_ITEM_XPAD   wdl_min(g_swell_ctheme.menubar_spacing_width,g_swell_ctheme.menubar_margin_width)
#define MAX_POSTMESSAGE_SIZE   1024
#define IS_CLASSNAME_LISTVIEW_LISTBOX(x)
#define SIXFROMLIST   list->p1,list->p2,list->p3, list->p4, list->p5, list->p6

Typedefs

typedef struct TimerInfoRec TimerInfoRec
typedef struct ccprocrec ccprocrec
typedef struct PMQ_rec PMQ_rec

Enumerations

enum  { LISTVIEW_HDR_YMARGIN = 2 }
enum  ListViewCapMode {
  LISTVIEW_CAP_NONE =0 , LISTVIEW_CAP_XSCROLL , LISTVIEW_CAP_YSCROLL , LISTVIEW_CAP_DRAG ,
  LISTVIEW_CAP_COLRESIZE , LISTVIEW_CAP_COLCLICK , LISTVIEW_CAP_COLREORDER
}

Functions

static bool swell_is_virtkey_char (int c)
HWND swell_oswindow_to_hwnd (SWELL_OSWINDOW w)
void swell_on_toplevel_raise (SWELL_OSWINDOW wnd)
HWND GetParent (HWND hwnd)
HWND GetDlgItem (HWND hwnd, int idx)
LONG_PTR SetWindowLong (HWND hwnd, int idx, LONG_PTR val)
LONG_PTR GetWindowLong (HWND hwnd, int idx)
static bool __isWindow (HWND hc, HWND hFind)
bool IsWindow (HWND hwnd)
bool IsWindowVisible (HWND hwnd)
bool IsModalDialogBox (HWND hwnd)
LRESULT SendMessage (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void swell_removeWindowFromParentOrTop (HWND__ *hwnd, bool removeFromOwner)
void RecurseDestroyWindow (HWND hwnd)
void DestroyWindow (HWND hwnd)
bool IsWindowEnabled (HWND hwnd)
void EnableWindow (HWND hwnd, int enable)
void SetForegroundWindow (HWND hwnd)
void SetFocus (HWND hwnd)
void SWELL_OnNavigationFocus (HWND ch)
int IsChild (HWND hwndParent, HWND hwndChild)
HWND SWELL_GetFocusedChild (HWND h)
HWND GetFocusIncludeMenus ()
HWND GetForegroundWindow ()
HWND GetFocus ()
void ScreenToClient (HWND hwnd, POINT *pt)
void ClientToScreen (HWND hwnd, POINT *pt)
void GetWindowContentViewRect (HWND hwnd, RECT *r)
void GetClientRect (HWND hwnd, RECT *r)
void SetWindowPos (HWND hwnd, HWND zorder, int x, int y, int cx, int cy, int flags)
BOOL EnumWindows (BOOL(*proc)(HWND, LPARAM), LPARAM lp)
HWND GetWindow (HWND hwnd, int what)
HWND SetParent (HWND hwnd, HWND newPar)
static void free_timer (TimerInfoRec *rec)
void SWELL_RunMessageLoop ()
UINT_PTR SetTimer (HWND hwnd, UINT_PTR timerid, UINT rate, TIMERPROC tProc)
BOOL KillTimer (HWND hwnd, UINT_PTR timerid)
BOOL SetDlgItemText (HWND hwnd, int idx, const char *text)
int GetWindowTextLength (HWND hwnd)
BOOL GetDlgItemText (HWND hwnd, int idx, char *text, int textlen)
void CheckDlgButton (HWND hwnd, int idx, int check)
int IsDlgButtonChecked (HWND hwnd, int idx)
BOOL SetDlgItemInt (HWND hwnd, int idx, int val, int issigned)
int GetDlgItemInt (HWND hwnd, int idx, BOOL *translated, int issigned)
void ShowWindow (HWND hwnd, int cmd)
voidSWELL_ModalWindowStart (HWND hwnd)
bool SWELL_ModalWindowRun (void *ctx, int *ret)
void SWELL_ModalWindowEnd (void *ctx)
void SWELL_CloseWindow (HWND hwnd)
static void Draw3DBox (HDC hdc, const RECT *r, int bgc, int topc, int botc, bool swap=false)
void SWELL_MakeSetCurParms (float xscale, float yscale, float xtrans, float ytrans, HWND parent, bool doauto, bool dosizetofit)
static void UpdateAutoCoords (RECT r)
static RECT MakeCoords (int x, int y, int w, int h, bool wantauto)
static void paintDialogBackground (HWND hwnd, const RECT *r, HDC hdc)
static bool fast_has_focus (HWND hwnd)
static bool draw_focus_indicator (HWND hwnd, HDC hdc, const RECT *drawr)
static LRESULT WINAPI buttonWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static HWND swell_makeButton (HWND owner, int idx, RECT *tr, const char *label, bool vis, int style)
static LRESULT WINAPI groupWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void calcScroll (int wh, int totalw, int scroll_x, int *thumbsz, int *thumbpos)
static void drawHorizontalScrollbar (HDC hdc, RECT cr, int vieww, int totalw, int scroll_x)
static void drawVerticalScrollbar (HDC hdc, RECT cr, int totalh, int scroll_y)
static int editMeasureLineLength (HDC hdc, const char *str, int str_len)
int swell_getLineLength (const char *buf, int *post_skip, int wrap_maxwid, HDC hdc)
static int utf8fs_charpos_to_bytepos (const WDL_FastString *fs, int charpos)
static bool editGetCharPos (HDC hdc, const char *str, int singleline_len, int charpos, int line_h, POINT *pt, int word_wrap, __SWELL_editControlState *es, HWND hwnd)
static int editHitTestLine (HDC hdc, const char *str, int str_len, int xpos, int ypos)
static int editHitTest (HDC hdc, const char *str, int singleline_len, int xpos, int ypos, int word_wrap, __SWELL_editControlState *es, HWND hwnd)
static bool is_word_char (char c)
static int scanWord (const char *buf, int bytepos, int dir)
static LRESULT OnEditKeyDown (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, bool wantReturn, bool isMultiLine, __SWELL_editControlState *es, bool isEditCtl)
static int editControlPaintLine (HDC hdc, const char *str, int str_len, int cursor_pos, int sel1, int sel2, const RECT *r, int dtflags)
static void passwordify (WDL_FastString **s)
static LRESULT WINAPI editWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI progressWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI trackbarWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI labelWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI comboWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
HWND SWELL_MakeButton (int def, const char *label, int idx, int x, int y, int w, int h, int flags)
 these are for swell-dlggen.h
HWND SWELL_MakeLabel (int align, const char *label, int idx, int x, int y, int w, int h, int flags)
HWND SWELL_MakeEditField (int idx, int x, int y, int w, int h, int flags)
HWND SWELL_MakeCheckBox (const char *name, int idx, int x, int y, int w, int h, int flags=0)
static const char * stateStringOnKey (UINT uMsg, WPARAM wParam, LPARAM lParam)
static LRESULT listViewWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT treeViewWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT tabControlWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
HWND SWELL_MakeListBox (int idx, int x, int y, int w, int h, int styles)
void SWELL_RegisterCustomControlCreator (SWELL_ControlCreatorProc proc)
void SWELL_UnregisterCustomControlCreator (SWELL_ControlCreatorProc proc)
HWND SWELL_MakeControl (const char *cname, int idx, const char *classname, int style, int x, int y, int w, int h, int exstyle)
HWND SWELL_MakeCombo (int idx, int x, int y, int w, int h, int flags)
HWND SWELL_MakeGroupBox (const char *name, int idx, int x, int y, int w, int h, int style)
int TabCtrl_GetItemCount (HWND hwnd)
BOOL TabCtrl_AdjustRect (HWND hwnd, BOOL fLarger, RECT *r)
BOOL TabCtrl_DeleteItem (HWND hwnd, int idx)
int TabCtrl_InsertItem (HWND hwnd, int idx, TCITEM *item)
int TabCtrl_SetCurSel (HWND hwnd, int idx)
int TabCtrl_GetCurSel (HWND hwnd)
void ListView_SetExtendedListViewStyleEx (HWND h, int flag, int mask)
void SWELL_SetListViewFastClickMask (HWND hList, int mask)
void ListView_SetImageList (HWND h, HIMAGELIST imagelist, int which)
int ListView_GetColumnWidth (HWND h, int pos)
void ListView_InsertColumn (HWND h, int pos, const LVCOLUMN *lvc)
void ListView_SetColumn (HWND h, int pos, const LVCOLUMN *lvc)
void ListView_GetItemText (HWND hwnd, int item, int subitem, char *text, int textmax)
int ListView_InsertItem (HWND h, const LVITEM *item)
void ListView_SetItemText (HWND h, int ipos, int cpos, const char *txt)
int ListView_GetNextItem (HWND h, int istart, int flags)
bool ListView_SetItem (HWND h, LVITEM *item)
bool ListView_GetItem (HWND h, LVITEM *item)
int ListView_GetItemState (HWND h, int ipos, UINT mask)
bool ListView_SetItemState (HWND h, int ipos, UINT state, UINT statemask)
void ListView_RedrawItems (HWND h, int startitem, int enditem)
void ListView_DeleteItem (HWND h, int ipos)
void ListView_DeleteAllItems (HWND h)
int ListView_GetSelectedCount (HWND h)
int ListView_GetItemCount (HWND h)
int ListView_GetSelectionMark (HWND h)
int SWELL_GetListViewHeaderHeight (HWND h)
void ListView_SetColumnWidth (HWND h, int pos, int wid)
int ListView_HitTest (HWND h, LVHITTESTINFO *pinf)
int ListView_SubItemHitTest (HWND h, LVHITTESTINFO *pinf)
void ListView_SetItemCount (HWND h, int cnt)
void ListView_EnsureVisible (HWND h, int i, BOOL pok)
bool ListView_GetSubItemRect (HWND h, int item, int subitem, int code, RECT *r)
bool ListView_GetItemRect (HWND h, int item, RECT *r, int code)
bool ListView_Scroll (HWND h, int xscroll, int yscroll)
void ListView_SortItems (HWND hwnd, PFNLVCOMPARE compf, LPARAM parm)
bool ListView_DeleteColumn (HWND h, int pos)
int ListView_GetCountPerPage (HWND h)
HWND ChildWindowFromPoint (HWND h, POINT p)
static HWND recurseOwnedWindowHitTest (HWND h, POINT p, int maxdepth)
HWND WindowFromPoint (POINT p)
BOOL InvalidateRect (HWND hwnd, const RECT *r, int eraseBk)
HWND GetCapture ()
HWND SetCapture (HWND hwnd)
void ReleaseCapture ()
static HWND getNextFocusWindow (HWND hwnd, bool rev, HWND foc_child)
LRESULT SwellDialogDefaultWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL EndPaint (HWND hwnd, PAINTSTRUCT *ps)
static bool wantRightAlignedMenuBarItem (const char *p)
static int menuBarHitTest (HWND hwnd, int mousex, int mousey, RECT *rOut, int forceItem, int expandedItem)
HWND swell_window_wants_all_input ()
int menuBarNavigate (int dir)
static void runMenuBar (HWND hwnd, HMENU__ *menu, int x, const RECT *use_r, int flag)
LRESULT DefWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
BOOL DragQueryPoint (HDROP hDrop, LPPOINT pt)
void DragFinish (HDROP hDrop)
UINT DragQueryFile (HDROP hDrop, UINT wf, char *buf, UINT bufsz)
BOOL PostMessage (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
void SWELL_MessageQueue_Clear (HWND h)
void SWELL_Internal_PostMessage_Init ()
void SWELL_MessageQueue_Flush ()
void SWELL_Internal_PMQ_ClearAllMessages (HWND hwnd)
BOOL SWELL_Internal_PostMessage (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
int EnumPropsEx (HWND hwnd, PROPENUMPROCEX proc, LPARAM lParam)
HANDLE GetProp (HWND hwnd, const char *name)
BOOL SetProp (HWND hwnd, const char *name, HANDLE val)
HANDLE RemoveProp (HWND hwnd, const char *name)
int GetSystemMetrics (int p)
BOOL ScrollWindow (HWND hwnd, int xamt, int yamt, const RECT *lpRect, const RECT *lpClipRect)
HWND FindWindowEx (HWND par, HWND lastw, const char *classname, const char *title)
HTREEITEM TreeView_InsertItem (HWND hwnd, TV_INSERTSTRUCT *ins)
BOOL TreeView_Expand (HWND hwnd, HTREEITEM item, UINT flag)
HTREEITEM TreeView_GetSelection (HWND hwnd)
void TreeView_DeleteItem (HWND hwnd, HTREEITEM item)
void TreeView_DeleteAllItems (HWND hwnd)
void TreeView_EnsureVisible (HWND hwnd, HTREEITEM item)
void TreeView_SelectItem (HWND hwnd, HTREEITEM item)
BOOL TreeView_GetItem (HWND hwnd, LPTVITEM pitem)
BOOL TreeView_SetItem (HWND hwnd, LPTVITEM pitem)
HTREEITEM TreeView_HitTest (HWND hwnd, TVHITTESTINFO *hti)
HTREEITEM TreeView_GetRoot (HWND hwnd)
HTREEITEM TreeView_GetParent (HWND hwnd, HTREEITEM item)
HTREEITEM TreeView_GetChild (HWND hwnd, HTREEITEM item)
HTREEITEM TreeView_GetNextSibling (HWND hwnd, HTREEITEM item)
BOOL TreeView_SetIndent (HWND hwnd, int indent)
void TreeView_SetBkColor (HWND hwnd, int color)
void TreeView_SetTextColor (HWND hwnd, int color)
void ListView_SetBkColor (HWND h, int color)
void ListView_SetTextBkColor (HWND h, int color)
void ListView_SetTextColor (HWND h, int color)
void ListView_SetGridColor (HWND h, int color)
void ListView_SetSelColors (HWND h, int *colors, int ncolors)
int ListView_GetTopIndex (HWND h)
BOOL ListView_GetColumnOrderArray (HWND h, int cnt, int *arr)
BOOL ListView_SetColumnOrderArray (HWND h, int cnt, int *arr)
HWND ListView_GetHeader (HWND h)
int Header_GetItemCount (HWND h)
BOOL Header_GetItem (HWND h, int col, HDITEM *hi)
BOOL Header_SetItem (HWND h, int col, HDITEM *hi)
BOOL EnumChildWindows (HWND hwnd, BOOL(*cwEnumFunc)(HWND, LPARAM), LPARAM lParam)
void SWELL_GetDesiredControlSize (HWND hwnd, RECT *r)
BOOL SWELL_IsGroupBox (HWND hwnd)
BOOL SWELL_IsButton (HWND hwnd)
BOOL SWELL_IsStaticText (HWND hwnd)
BOOL ShellExecute (HWND hwndDlg, const char *action, const char *content1, const char *content2, const char *content3, int blah)
static LRESULT WINAPI focusRectWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
void SWELL_DrawFocusRect (HWND hwndPar, RECT *rct, void **handle)
void SWELL_BroadcastMessage (UINT uMsg, WPARAM wParam, LPARAM lParam)
void SetOpaque (HWND h, bool opaque)
void SetAllowNoMiddleManRendering (HWND h, bool allow)
int SWELL_GetDefaultButtonID (HWND hwndDlg, bool onlyIfEnabled)
void SWELL_HideApp ()
BOOL SWELL_GetGestureInfo (LPARAM lParam, GESTUREINFO *gi)
void SWELL_SetWindowWantRaiseAmt (HWND h, int amt)
int SWELL_GetWindowWantRaiseAmt (HWND h)
void SWELL_GenerateDialogFromList (const void *_list, int listsz)
void SWELL_SetClassName (HWND hwnd, const char *p)
int GetClassName (HWND hwnd, char *buf, int bufsz)
void SWELL_DisableContextMenu (HWND hwnd, bool dis)

Variables

bool swell_is_likely_capslock
SWELL_OSWINDOW SWELL_focused_oswindow
HWND swell_captured_window
HWND__SWELL_topwindows
static TimerInfoRecm_timer_list
static WDL_Mutex m_timermutex
static TimerInfoRecspare_timers
static HWND m_make_owner
static RECT m_transform
static bool m_doautoright
static RECT m_lastdoauto
static bool m_sizetofits
static ccprocrecm_ccprocs
static HFONT menubar_font
static RECT g_menubar_lastrect
static HWND g_menubar_active
static bool g_menubar_active_drag
RECT g_trackpopup_yroot
static WDL_Mutex m_pmq_mutex
static PMQ_recm_pmq
static PMQ_recm_pmq_empty
static PMQ_recm_pmq_tail
static int m_pmq_size

Macro Definition Documentation

◆ ACTIONTARGET

#define ACTIONTARGET   (m_make_owner)

◆ EDIT_ALLOW_MULTILINE_CACHE

#define EDIT_ALLOW_MULTILINE_CACHE ( wwrap,
hwnd,
tlen )
Value:
((wwrap)>0 && ((hwnd)->m_style & (ES_READONLY|ES_MULTILINE)) == (ES_READONLY|ES_MULTILINE) && (tlen)>10000)
#define ES_READONLY
Definition swell-dlggen.h:102
#define ES_MULTILINE
Definition swell-dlggen.h:145
RECT const char void HWND hwnd
Definition swell-functions.h:1066

◆ IS_CLASSNAME_LISTVIEW_LISTBOX

#define IS_CLASSNAME_LISTVIEW_LISTBOX ( x)
Value:
((x) && (!strcmp(x,"SysListView32") || !strcmp(x,"ListBox")))
unsigned x[BMAX+1]
Definition inflate.c:1586

◆ MAX_POSTMESSAGE_SIZE

#define MAX_POSTMESSAGE_SIZE   1024

◆ MENUBAR_SELECTED_ITEM_XPAD

#define MENUBAR_SELECTED_ITEM_XPAD   wdl_min(g_swell_ctheme.menubar_spacing_width,g_swell_ctheme.menubar_margin_width)

◆ SIXFROMLIST

#define SIXFROMLIST   list->p1,list->p2,list->p3, list->p4, list->p5, list->p6

◆ STATEIMAGEMASKTOINDEX

#define STATEIMAGEMASKTOINDEX ( x)
Value:
(((x)>>16)&0xff)

◆ SWELL_INTERNAL_HTREEITEM_IMPL

#define SWELL_INTERNAL_HTREEITEM_IMPL

◆ SWELL_INTERNAL_MERGESORT_IMPL

#define SWELL_INTERNAL_MERGESORT_IMPL

◆ TABCONTROL_HEIGHT

#define TABCONTROL_HEIGHT   SWELL_UI_SCALE(20)

◆ TRANSFORMFONTSIZE

#define TRANSFORMFONTSIZE   ((m_transform.right/65536.0+1.0)*3.7)

◆ WDL_NO_DEFINE_MINMAX

#define WDL_NO_DEFINE_MINMAX

Typedef Documentation

◆ ccprocrec

typedef struct ccprocrec ccprocrec

◆ PMQ_rec

typedef struct PMQ_rec PMQ_rec

◆ TimerInfoRec

typedef struct TimerInfoRec TimerInfoRec

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LISTVIEW_HDR_YMARGIN 

◆ ListViewCapMode

Enumerator
LISTVIEW_CAP_NONE 
LISTVIEW_CAP_XSCROLL 
LISTVIEW_CAP_YSCROLL 
LISTVIEW_CAP_DRAG 
LISTVIEW_CAP_COLRESIZE 
LISTVIEW_CAP_COLCLICK 
LISTVIEW_CAP_COLREORDER 

Function Documentation

◆ __isWindow()

bool __isWindow ( HWND hc,
HWND hFind )
static

◆ buttonWindowProc()

LRESULT WINAPI buttonWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ calcScroll()

void calcScroll ( int wh,
int totalw,
int scroll_x,
int * thumbsz,
int * thumbpos )
static

◆ CheckDlgButton()

void CheckDlgButton ( HWND hwnd,
int idx,
int check )

◆ ChildWindowFromPoint()

HWND ChildWindowFromPoint ( HWND h,
POINT p )

◆ ClientToScreen()

void ClientToScreen ( HWND hwnd,
POINT * pt )

◆ comboWindowProc()

LRESULT WINAPI comboWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ DefWindowProc()

LRESULT DefWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )

◆ DestroyWindow()

void DestroyWindow ( HWND hwnd)

◆ DragFinish()

void DragFinish ( HDROP hDrop)

◆ DragQueryFile()

UINT DragQueryFile ( HDROP hDrop,
UINT wf,
char * buf,
UINT bufsz )

◆ DragQueryPoint()

BOOL DragQueryPoint ( HDROP hDrop,
LPPOINT pt )

◆ Draw3DBox()

void Draw3DBox ( HDC hdc,
const RECT * r,
int bgc,
int topc,
int botc,
bool swap = false )
static

◆ draw_focus_indicator()

bool draw_focus_indicator ( HWND hwnd,
HDC hdc,
const RECT * drawr )
static

◆ drawHorizontalScrollbar()

void drawHorizontalScrollbar ( HDC hdc,
RECT cr,
int vieww,
int totalw,
int scroll_x )
static

◆ drawVerticalScrollbar()

void drawVerticalScrollbar ( HDC hdc,
RECT cr,
int totalh,
int scroll_y )
static

◆ editControlPaintLine()

int editControlPaintLine ( HDC hdc,
const char * str,
int str_len,
int cursor_pos,
int sel1,
int sel2,
const RECT * r,
int dtflags )
static

◆ editGetCharPos()

bool editGetCharPos ( HDC hdc,
const char * str,
int singleline_len,
int charpos,
int line_h,
POINT * pt,
int word_wrap,
__SWELL_editControlState * es,
HWND hwnd )
static

◆ editHitTest()

int editHitTest ( HDC hdc,
const char * str,
int singleline_len,
int xpos,
int ypos,
int word_wrap,
__SWELL_editControlState * es,
HWND hwnd )
static

◆ editHitTestLine()

int editHitTestLine ( HDC hdc,
const char * str,
int str_len,
int xpos,
int ypos )
static

◆ editMeasureLineLength()

int editMeasureLineLength ( HDC hdc,
const char * str,
int str_len )
static

◆ editWindowProc()

LRESULT WINAPI editWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ EnableWindow()

void EnableWindow ( HWND hwnd,
int enable )

◆ EndPaint()

BOOL EndPaint ( HWND hwnd,
PAINTSTRUCT * ps )

◆ EnumChildWindows()

BOOL EnumChildWindows ( HWND hwnd,
BOOL(* cwEnumFunc )(HWND, LPARAM),
LPARAM lParam )

◆ EnumPropsEx()

int EnumPropsEx ( HWND hwnd,
PROPENUMPROCEX proc,
LPARAM lParam )

◆ EnumWindows()

BOOL EnumWindows ( BOOL(* proc )(HWND, LPARAM),
LPARAM lp )

◆ fast_has_focus()

bool fast_has_focus ( HWND hwnd)
static

◆ FindWindowEx()

HWND FindWindowEx ( HWND par,
HWND lastw,
const char * classname,
const char * title )

◆ focusRectWndProc()

LRESULT WINAPI focusRectWndProc ( HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam )
static

◆ free_timer()

void free_timer ( TimerInfoRec * rec)
static

◆ GetCapture()

HWND GetCapture ( )

◆ GetClassName()

int GetClassName ( HWND hwnd,
char * buf,
int bufsz )

◆ GetClientRect()

void GetClientRect ( HWND hwnd,
RECT * r )

◆ GetDlgItem()

HWND GetDlgItem ( HWND hwnd,
int idx )

◆ GetDlgItemInt()

int GetDlgItemInt ( HWND hwnd,
int idx,
BOOL * translated,
int issigned )

◆ GetDlgItemText()

BOOL GetDlgItemText ( HWND hwnd,
int idx,
char * text,
int textlen )

◆ GetFocus()

HWND GetFocus ( )

◆ GetFocusIncludeMenus()

HWND GetFocusIncludeMenus ( void )

◆ GetForegroundWindow()

HWND GetForegroundWindow ( )

◆ getNextFocusWindow()

HWND getNextFocusWindow ( HWND hwnd,
bool rev,
HWND foc_child )
static

◆ GetParent()

HWND GetParent ( HWND hwnd)

◆ GetProp()

HANDLE GetProp ( HWND hwnd,
const char * name )

◆ GetSystemMetrics()

int GetSystemMetrics ( int p)

◆ GetWindow()

HWND GetWindow ( HWND hwnd,
int what )

◆ GetWindowContentViewRect()

void GetWindowContentViewRect ( HWND hwnd,
RECT * r )

◆ GetWindowLong()

LONG_PTR GetWindowLong ( HWND hwnd,
int idx )

◆ GetWindowTextLength()

int GetWindowTextLength ( HWND hwnd)

◆ groupWindowProc()

LRESULT WINAPI groupWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ Header_GetItem()

BOOL Header_GetItem ( HWND h,
int col,
HDITEM * hi )

◆ Header_GetItemCount()

int Header_GetItemCount ( HWND h)

◆ Header_SetItem()

BOOL Header_SetItem ( HWND h,
int col,
HDITEM * hi )

◆ InvalidateRect()

BOOL InvalidateRect ( HWND hwnd,
const RECT * r,
int eraseBk )

◆ is_word_char()

bool is_word_char ( char c)
static

◆ IsChild()

int IsChild ( HWND hwndParent,
HWND hwndChild )

◆ IsDlgButtonChecked()

int IsDlgButtonChecked ( HWND hwnd,
int idx )

◆ IsModalDialogBox()

bool IsModalDialogBox ( HWND hwnd)

◆ IsWindow()

bool IsWindow ( HWND hwnd)

◆ IsWindowEnabled()

bool IsWindowEnabled ( HWND hwnd)

◆ IsWindowVisible()

bool IsWindowVisible ( HWND hwnd)

◆ KillTimer()

BOOL KillTimer ( HWND hwnd,
UINT_PTR timerid )

◆ labelWindowProc()

LRESULT WINAPI labelWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ ListView_DeleteAllItems()

void ListView_DeleteAllItems ( HWND h)

◆ ListView_DeleteColumn()

bool ListView_DeleteColumn ( HWND h,
int pos )

◆ ListView_DeleteItem()

void ListView_DeleteItem ( HWND h,
int ipos )

◆ ListView_EnsureVisible()

void ListView_EnsureVisible ( HWND h,
int i,
BOOL pok )

◆ ListView_GetColumnOrderArray()

BOOL ListView_GetColumnOrderArray ( HWND h,
int cnt,
int * arr )

◆ ListView_GetColumnWidth()

int ListView_GetColumnWidth ( HWND h,
int pos )

◆ ListView_GetCountPerPage()

int ListView_GetCountPerPage ( HWND h)

◆ ListView_GetHeader()

HWND ListView_GetHeader ( HWND h)

◆ ListView_GetItem()

bool ListView_GetItem ( HWND h,
LVITEM * item )

◆ ListView_GetItemCount()

int ListView_GetItemCount ( HWND h)

◆ ListView_GetItemRect()

bool ListView_GetItemRect ( HWND h,
int item,
RECT * r,
int code )

◆ ListView_GetItemState()

int ListView_GetItemState ( HWND h,
int ipos,
UINT mask )

◆ ListView_GetItemText()

void ListView_GetItemText ( HWND hwnd,
int item,
int subitem,
char * text,
int textmax )

◆ ListView_GetNextItem()

int ListView_GetNextItem ( HWND h,
int istart,
int flags )

◆ ListView_GetSelectedCount()

int ListView_GetSelectedCount ( HWND h)

◆ ListView_GetSelectionMark()

int ListView_GetSelectionMark ( HWND h)

◆ ListView_GetSubItemRect()

bool ListView_GetSubItemRect ( HWND h,
int item,
int subitem,
int code,
RECT * r )

◆ ListView_GetTopIndex()

int ListView_GetTopIndex ( HWND h)

◆ ListView_HitTest()

int ListView_HitTest ( HWND h,
LVHITTESTINFO * pinf )

◆ ListView_InsertColumn()

void ListView_InsertColumn ( HWND h,
int pos,
const LVCOLUMN * lvc )

◆ ListView_InsertItem()

int ListView_InsertItem ( HWND h,
const LVITEM * item )

◆ ListView_RedrawItems()

void ListView_RedrawItems ( HWND h,
int startitem,
int enditem )

◆ ListView_Scroll()

bool ListView_Scroll ( HWND h,
int xscroll,
int yscroll )

◆ ListView_SetBkColor()

void ListView_SetBkColor ( HWND h,
int color )

◆ ListView_SetColumn()

void ListView_SetColumn ( HWND h,
int pos,
const LVCOLUMN * lvc )

◆ ListView_SetColumnOrderArray()

BOOL ListView_SetColumnOrderArray ( HWND h,
int cnt,
int * arr )

◆ ListView_SetColumnWidth()

void ListView_SetColumnWidth ( HWND h,
int pos,
int wid )

◆ ListView_SetExtendedListViewStyleEx()

void ListView_SetExtendedListViewStyleEx ( HWND h,
int flag,
int mask )

◆ ListView_SetGridColor()

void ListView_SetGridColor ( HWND h,
int color )

◆ ListView_SetImageList()

void ListView_SetImageList ( HWND h,
HIMAGELIST imagelist,
int which )

◆ ListView_SetItem()

bool ListView_SetItem ( HWND h,
LVITEM * item )

◆ ListView_SetItemCount()

void ListView_SetItemCount ( HWND h,
int cnt )

◆ ListView_SetItemState()

bool ListView_SetItemState ( HWND h,
int ipos,
UINT state,
UINT statemask )

◆ ListView_SetItemText()

void ListView_SetItemText ( HWND h,
int ipos,
int cpos,
const char * txt )

◆ ListView_SetSelColors()

void ListView_SetSelColors ( HWND h,
int * colors,
int ncolors )

◆ ListView_SetTextBkColor()

void ListView_SetTextBkColor ( HWND h,
int color )

◆ ListView_SetTextColor()

void ListView_SetTextColor ( HWND h,
int color )

◆ ListView_SortItems()

void ListView_SortItems ( HWND hwnd,
PFNLVCOMPARE compf,
LPARAM parm )

◆ ListView_SubItemHitTest()

int ListView_SubItemHitTest ( HWND h,
LVHITTESTINFO * pinf )

◆ listViewWindowProc()

LRESULT listViewWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ MakeCoords()

RECT MakeCoords ( int x,
int y,
int w,
int h,
bool wantauto )
static

◆ menuBarHitTest()

int menuBarHitTest ( HWND hwnd,
int mousex,
int mousey,
RECT * rOut,
int forceItem,
int expandedItem )
static

◆ menuBarNavigate()

int menuBarNavigate ( int dir)

◆ OnEditKeyDown()

LRESULT OnEditKeyDown ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam,
bool wantReturn,
bool isMultiLine,
__SWELL_editControlState * es,
bool isEditCtl )
static

◆ paintDialogBackground()

void paintDialogBackground ( HWND hwnd,
const RECT * r,
HDC hdc )
static

◆ passwordify()

void passwordify ( WDL_FastString ** s)
static

◆ PostMessage()

BOOL PostMessage ( HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam )

◆ progressWindowProc()

LRESULT WINAPI progressWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ RecurseDestroyWindow()

void RecurseDestroyWindow ( HWND hwnd)

◆ recurseOwnedWindowHitTest()

HWND recurseOwnedWindowHitTest ( HWND h,
POINT p,
int maxdepth )
static

◆ ReleaseCapture()

void ReleaseCapture ( )

◆ RemoveProp()

HANDLE RemoveProp ( HWND hwnd,
const char * name )

◆ runMenuBar()

void runMenuBar ( HWND hwnd,
HMENU__ * menu,
int x,
const RECT * use_r,
int flag )
static

◆ scanWord()

int scanWord ( const char * buf,
int bytepos,
int dir )
static

◆ ScreenToClient()

void ScreenToClient ( HWND hwnd,
POINT * pt )

◆ ScrollWindow()

BOOL ScrollWindow ( HWND hwnd,
int xamt,
int yamt,
const RECT * lpRect,
const RECT * lpClipRect )

◆ SendMessage()

LRESULT SendMessage ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )

◆ SetAllowNoMiddleManRendering()

void SetAllowNoMiddleManRendering ( HWND h,
bool allow )

◆ SetCapture()

HWND SetCapture ( HWND hwnd)

◆ SetDlgItemInt()

BOOL SetDlgItemInt ( HWND hwnd,
int idx,
int val,
int issigned )

◆ SetDlgItemText()

BOOL SetDlgItemText ( HWND hwnd,
int idx,
const char * text )

◆ SetFocus()

void SetFocus ( HWND hwnd)

◆ SetForegroundWindow()

void SetForegroundWindow ( HWND hwnd)

◆ SetOpaque()

void SetOpaque ( HWND h,
bool opaque )

◆ SetParent()

HWND SetParent ( HWND hwnd,
HWND newPar )

◆ SetProp()

BOOL SetProp ( HWND hwnd,
const char * name,
HANDLE val )

◆ SetTimer()

UINT_PTR SetTimer ( HWND hwnd,
UINT_PTR timerid,
UINT rate,
TIMERPROC tProc )

◆ SetWindowLong()

LONG_PTR SetWindowLong ( HWND hwnd,
int idx,
LONG_PTR val )

◆ SetWindowPos()

void SetWindowPos ( HWND hwnd,
HWND zorder,
int x,
int y,
int cx,
int cy,
int flags )

◆ ShellExecute()

BOOL ShellExecute ( HWND hwndDlg,
const char * action,
const char * content1,
const char * content2,
const char * content3,
int blah )

◆ ShowWindow()

void ShowWindow ( HWND hwnd,
int cmd )

◆ stateStringOnKey()

const char * stateStringOnKey ( UINT uMsg,
WPARAM wParam,
LPARAM lParam )
static

◆ SWELL_BroadcastMessage()

void SWELL_BroadcastMessage ( UINT uMsg,
WPARAM wParam,
LPARAM lParam )

◆ SWELL_CloseWindow()

void SWELL_CloseWindow ( HWND hwnd)

◆ SWELL_DisableContextMenu()

void SWELL_DisableContextMenu ( HWND hwnd,
bool dis )

◆ SWELL_DrawFocusRect()

void SWELL_DrawFocusRect ( HWND hwndPar,
RECT * rct,
void ** handle )

◆ SWELL_GenerateDialogFromList()

void SWELL_GenerateDialogFromList ( const void * _list,
int listsz )

◆ SWELL_GetDefaultButtonID()

int SWELL_GetDefaultButtonID ( HWND hwndDlg,
bool onlyIfEnabled )

◆ SWELL_GetDesiredControlSize()

void SWELL_GetDesiredControlSize ( HWND hwnd,
RECT * r )

◆ SWELL_GetFocusedChild()

HWND SWELL_GetFocusedChild ( HWND h)

◆ SWELL_GetGestureInfo()

BOOL SWELL_GetGestureInfo ( LPARAM lParam,
GESTUREINFO * gi )

◆ swell_getLineLength()

int swell_getLineLength ( const char * buf,
int * post_skip,
int wrap_maxwid,
HDC hdc )

◆ SWELL_GetListViewHeaderHeight()

int SWELL_GetListViewHeaderHeight ( HWND h)

◆ SWELL_GetWindowWantRaiseAmt()

int SWELL_GetWindowWantRaiseAmt ( HWND h)

◆ SWELL_HideApp()

void SWELL_HideApp ( )

◆ SWELL_Internal_PMQ_ClearAllMessages()

void SWELL_Internal_PMQ_ClearAllMessages ( HWND hwnd)

◆ SWELL_Internal_PostMessage()

BOOL SWELL_Internal_PostMessage ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )

◆ SWELL_Internal_PostMessage_Init()

void SWELL_Internal_PostMessage_Init ( )

◆ swell_is_virtkey_char()

bool swell_is_virtkey_char ( int c)
static

◆ SWELL_IsButton()

BOOL SWELL_IsButton ( HWND hwnd)

◆ SWELL_IsGroupBox()

BOOL SWELL_IsGroupBox ( HWND hwnd)

◆ SWELL_IsStaticText()

BOOL SWELL_IsStaticText ( HWND hwnd)

◆ SWELL_MakeButton()

HWND SWELL_MakeButton ( int def,
const char * label,
int idx,
int x,
int y,
int w,
int h,
int flags )

these are for swell-dlggen.h

◆ swell_makeButton()

HWND swell_makeButton ( HWND owner,
int idx,
RECT * tr,
const char * label,
bool vis,
int style )
static

◆ SWELL_MakeCheckBox()

HWND SWELL_MakeCheckBox ( const char * name,
int idx,
int x,
int y,
int w,
int h,
int flags = 0 )

◆ SWELL_MakeCombo()

HWND SWELL_MakeCombo ( int idx,
int x,
int y,
int w,
int h,
int flags )

◆ SWELL_MakeControl()

HWND SWELL_MakeControl ( const char * cname,
int idx,
const char * classname,
int style,
int x,
int y,
int w,
int h,
int exstyle )

◆ SWELL_MakeEditField()

HWND SWELL_MakeEditField ( int idx,
int x,
int y,
int w,
int h,
int flags )

◆ SWELL_MakeGroupBox()

HWND SWELL_MakeGroupBox ( const char * name,
int idx,
int x,
int y,
int w,
int h,
int style )

◆ SWELL_MakeLabel()

HWND SWELL_MakeLabel ( int align,
const char * label,
int idx,
int x,
int y,
int w,
int h,
int flags )

◆ SWELL_MakeListBox()

HWND SWELL_MakeListBox ( int idx,
int x,
int y,
int w,
int h,
int styles )

◆ SWELL_MakeSetCurParms()

void SWELL_MakeSetCurParms ( float xscale,
float yscale,
float xtrans,
float ytrans,
HWND parent,
bool doauto,
bool dosizetofit )

◆ SWELL_MessageQueue_Clear()

void SWELL_MessageQueue_Clear ( HWND h)

◆ SWELL_MessageQueue_Flush()

void SWELL_MessageQueue_Flush ( )

◆ SWELL_ModalWindowEnd()

void SWELL_ModalWindowEnd ( void * ctx)

◆ SWELL_ModalWindowRun()

bool SWELL_ModalWindowRun ( void * ctx,
int * ret )

◆ SWELL_ModalWindowStart()

void * SWELL_ModalWindowStart ( HWND hwnd)

◆ swell_on_toplevel_raise()

void swell_on_toplevel_raise ( SWELL_OSWINDOW wnd)

◆ SWELL_OnNavigationFocus()

void SWELL_OnNavigationFocus ( HWND ch)

◆ swell_oswindow_to_hwnd()

HWND swell_oswindow_to_hwnd ( SWELL_OSWINDOW w)

◆ SWELL_RegisterCustomControlCreator()

void SWELL_RegisterCustomControlCreator ( SWELL_ControlCreatorProc proc)

◆ swell_removeWindowFromParentOrTop()

void swell_removeWindowFromParentOrTop ( HWND__ * hwnd,
bool removeFromOwner )
static

◆ SWELL_RunMessageLoop()

void SWELL_RunMessageLoop ( )

◆ SWELL_SetClassName()

void SWELL_SetClassName ( HWND hwnd,
const char * p )

◆ SWELL_SetListViewFastClickMask()

void SWELL_SetListViewFastClickMask ( HWND hList,
int mask )

◆ SWELL_SetWindowWantRaiseAmt()

void SWELL_SetWindowWantRaiseAmt ( HWND h,
int amt )

◆ SWELL_UnregisterCustomControlCreator()

void SWELL_UnregisterCustomControlCreator ( SWELL_ControlCreatorProc proc)

◆ swell_window_wants_all_input()

HWND swell_window_wants_all_input ( )

◆ SwellDialogDefaultWindowProc()

LRESULT SwellDialogDefaultWindowProc ( HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam )

◆ tabControlWindowProc()

LRESULT tabControlWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ TabCtrl_AdjustRect()

BOOL TabCtrl_AdjustRect ( HWND hwnd,
BOOL fLarger,
RECT * r )

◆ TabCtrl_DeleteItem()

BOOL TabCtrl_DeleteItem ( HWND hwnd,
int idx )

◆ TabCtrl_GetCurSel()

int TabCtrl_GetCurSel ( HWND hwnd)

◆ TabCtrl_GetItemCount()

int TabCtrl_GetItemCount ( HWND hwnd)

◆ TabCtrl_InsertItem()

int TabCtrl_InsertItem ( HWND hwnd,
int idx,
TCITEM * item )

◆ TabCtrl_SetCurSel()

int TabCtrl_SetCurSel ( HWND hwnd,
int idx )

◆ trackbarWindowProc()

LRESULT WINAPI trackbarWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ TreeView_DeleteAllItems()

void TreeView_DeleteAllItems ( HWND hwnd)

◆ TreeView_DeleteItem()

void TreeView_DeleteItem ( HWND hwnd,
HTREEITEM item )

◆ TreeView_EnsureVisible()

void TreeView_EnsureVisible ( HWND hwnd,
HTREEITEM item )

◆ TreeView_Expand()

BOOL TreeView_Expand ( HWND hwnd,
HTREEITEM item,
UINT flag )

◆ TreeView_GetChild()

HTREEITEM TreeView_GetChild ( HWND hwnd,
HTREEITEM item )

◆ TreeView_GetItem()

BOOL TreeView_GetItem ( HWND hwnd,
LPTVITEM pitem )

◆ TreeView_GetNextSibling()

HTREEITEM TreeView_GetNextSibling ( HWND hwnd,
HTREEITEM item )

◆ TreeView_GetParent()

HTREEITEM TreeView_GetParent ( HWND hwnd,
HTREEITEM item )

◆ TreeView_GetRoot()

HTREEITEM TreeView_GetRoot ( HWND hwnd)

◆ TreeView_GetSelection()

HTREEITEM TreeView_GetSelection ( HWND hwnd)

◆ TreeView_HitTest()

HTREEITEM TreeView_HitTest ( HWND hwnd,
TVHITTESTINFO * hti )

◆ TreeView_InsertItem()

HTREEITEM TreeView_InsertItem ( HWND hwnd,
TV_INSERTSTRUCT * ins )

◆ TreeView_SelectItem()

void TreeView_SelectItem ( HWND hwnd,
HTREEITEM item )

◆ TreeView_SetBkColor()

void TreeView_SetBkColor ( HWND hwnd,
int color )

◆ TreeView_SetIndent()

BOOL TreeView_SetIndent ( HWND hwnd,
int indent )

◆ TreeView_SetItem()

BOOL TreeView_SetItem ( HWND hwnd,
LPTVITEM pitem )

◆ TreeView_SetTextColor()

void TreeView_SetTextColor ( HWND hwnd,
int color )

◆ treeViewWindowProc()

LRESULT treeViewWindowProc ( HWND hwnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

◆ UpdateAutoCoords()

void UpdateAutoCoords ( RECT r)
static

◆ utf8fs_charpos_to_bytepos()

int utf8fs_charpos_to_bytepos ( const WDL_FastString * fs,
int charpos )
static

◆ wantRightAlignedMenuBarItem()

bool wantRightAlignedMenuBarItem ( const char * p)
static

◆ WindowFromPoint()

HWND WindowFromPoint ( POINT p)

Variable Documentation

◆ g_menubar_active

HWND g_menubar_active
static

◆ g_menubar_active_drag

bool g_menubar_active_drag
static

◆ g_menubar_lastrect

RECT g_menubar_lastrect
static

◆ g_trackpopup_yroot

RECT g_trackpopup_yroot

◆ m_ccprocs

ccprocrec* m_ccprocs
static

◆ m_doautoright

bool m_doautoright
static

◆ m_lastdoauto

RECT m_lastdoauto
static

◆ m_make_owner

HWND m_make_owner
static

◆ m_pmq

PMQ_rec* m_pmq
static

◆ m_pmq_empty

PMQ_rec * m_pmq_empty
static

◆ m_pmq_mutex

WDL_Mutex m_pmq_mutex
static

◆ m_pmq_size

int m_pmq_size
static

◆ m_pmq_tail

PMQ_rec * m_pmq_tail
static

◆ m_sizetofits

bool m_sizetofits
static

◆ m_timer_list

TimerInfoRec* m_timer_list
static

◆ m_timermutex

WDL_Mutex m_timermutex
static

◆ m_transform

RECT m_transform
static

◆ menubar_font

HFONT menubar_font
static

◆ spare_timers

TimerInfoRec* spare_timers
static

◆ swell_captured_window

HWND swell_captured_window

◆ SWELL_focused_oswindow

SWELL_OSWINDOW SWELL_focused_oswindow

◆ swell_is_likely_capslock

bool swell_is_likely_capslock

◆ SWELL_topwindows

HWND__* SWELL_topwindows