51 #ifndef FRAME_WINDOW_H_INCLUDED 52 #define FRAME_WINDOW_H_INCLUDED 182 #define FRAME_WINDOW_TAG (*((const unsigned int *)"FWFW")) 713 int iButtonMask,
int iACS);
715 int iButtonMask,
int iACS);
717 int iButtonMask,
int iACS);
719 int iButtonMask,
int iACS);
757 #if !defined(_FRAME_WINDOW_C_) && !defined(_CLIPBOARD_HELPER_C) 763 #endif // !defined(_FRAME_WINDOW_C_) && !defined(_CLIPBOARD_HELPER_C) 795 int iX,
int iY,
int iWidth,
int iHeight,
893 #define FW_MENU_HANDLER_BEGIN(X) static const WBFWMenuHandler X[] = { 902 #define FW_MENU_HANDLER_ENTRY(X,Y,Z) { (unsigned long)X, Y, Z }, 907 #define FW_MENU_HANDLER_END {0, 0, 0} }; 942 #define FWGetFocusWindow(pFW) (FWGetNumContWindows(pFW) > 0 ? FWGetContainedWindowByIndex(pFW, -1) : NULL) 1044 #define MOVE_CHILD_FRAME_TAB_INDEX_BEGINNING 0 1049 #define MOVE_CHILD_FRAME_TAB_INDEX_RIGHT -2 1054 #define MOVE_CHILD_FRAME_TAB_INDEX_LEFT -1 1160 int FWDoSelectionEvents(
WBFrameWindow *pFrameWindow, Window wID, Window wIDMenu, XEvent *pEvent);
1166 #endif // __cplusplus 1169 #endif // FRAME_WINDOW_H_INCLUDED RESERVED - 'splitter' window with horizontal sizeable 'split'.
void(* pgleft)(WBChildFrame *, int iACS)
'page left' navigation.
int iFlags
bitmask of attribute flags (see WBFrameWindow_FLAGS enumeration)
void FWReplaceContainedWindow(WBFrameWindow *pFrameWindow, WBChildFrame *pCont, WBChildFrame *pContNew)
Replace a 'contained' window from a frame window.
Window wID
Window id for the frame window.
WBWinEvent pUserCallback
message callback function pointer (can be NULL)
void(* home)(WBChildFrame *, int iACS)
'home' arrow navigation.
set this to disable tabs (single child frame only)
void(* scancode)(WBChildFrame *, XClientMessageEvent *)
handler for 'other scan code' WB_CHAR Client Messages.
int iClientY
The current Y position of the frame window's client area (relative to the window)
void(* leftarrow)(WBChildFrame *, int iACS)
'left' arrow navigation.
void FWRemoveContainedWindow(WBFrameWindow *pFrameWindow, WBChildFrame *pCont)
Removes a 'contained' window from a frame window. Does not destroy the 'contained' window.
struct tagWBChildFrame * pNext
'Next Object' pointer in an internally stored linked list (do not alter or use this)
void(* help)(WBChildFrame *, int iACS)
'help' context (F1).
void(* undo)(WBChildFrame *)
perform an undo operation
void * WBGetWindowData(Window wID, int iIndex)
Gets the data associated with this window and the specified index.
void(* pgright)(WBChildFrame *, int iACS)
'page right' navigation.
maximum flag value (for reference only)
void(* hover_cancel)(WBChildFrame *)
'mouse hover' cancel notification
set this flag for application top-level window and whenever it is destroyed the application will exit
void FWDestroyFrameWindow2(WBFrameWindow *pFrameWindow)
Function to destroy a frame window based on the WBFrameWindow structure.
void(* do_char)(WBChildFrame *, XClientMessageEvent *)
handler for regular WB_CHAR Client Messages (typed-in characters).
WBStatusTabInfo_FLAGS
enumeration for bit flags that are 'or'd with the tab stop index
void FWDestroyFrameWindow(Window wID)
Function to destroy a frame window based on the Window id.
WBFWMenuHandler * pMenuHandler
menu handler for this child frame's menu (NULL = 'use default')
structure for managing menu callbacks
int FWGetChildFrameIndex(WBFrameWindow *pFrameWindow, WBChildFrame *pCont)
Sets the focus to a specific contained window using its tab order index.
unsigned int ulTag
tag indicating I'm a 'Child Frame UI' structure
does not use MDI tabs [intended for SDI interface]
void(* mouse_cancel)(WBChildFrame *)
'mouse cancel' notification (cancel 'drag', etc.).
Window wID
window identifier for the 'Child Frame' window. may contain 'None' while being destroyed
#define FRAME_WINDOW_TAG
TAG for the WBFrameWindow structure.
mask for the 'justification' value
static __inline__ WBFrameWindow * FWGetFrameWindowStruct(Window wID)
Obtain the associated WBFrameWindow structure pointer for a frame window's Window ID.
left-justify text within the column (default)
WBFrameWindow_FLAGS
Frame Window type and status flags.
WB_FONTC FWGetFont(WBFrameWindow *pFW)
Get the frame window WB_FONTC.
right justify text within the column
void FWSetMenuHandlers(WBFrameWindow *pFrameWindow, const WBFWMenuHandler *pHandlerArray)
Function to assign the default menu handler to a frame window.
void(* toggle_ins_mode)(WBChildFrame *)
toggles insert mode on or off
WB_FONTC FWGetBoldFont(WBFrameWindow *pFW)
Get the frame window bold WB_FONTC.
void(* get_row_col)(WBChildFrame *, int *piR, int *piC)
Obtain the current row/column cursor locationfor UI notification.
internal wrapper struct for X11 'geometry' definition
set this to make window immediately visible
void(* tab)(WBChildFrame *, int iACS)
'tab' char, or tab navigation.
void FWRecalcLayout(Window wID)
Force a frame window to recalculate its layout, which may involve resizing multiple contained windows...
void(* delete_sel)(WBChildFrame *)
delete selection only
uintptr_t lMenuID
menu ID (< 0x10000L) or const pointer to string
void(* bkspace)(WBChildFrame *, int iACS)
'backspace' delete character (backspace equivalent), or perform related 'backspace' operation via ctr...
WB_GEOM geomEntire
client-area geometry (excludes scroll bars)
XColor FWGetDefaultFG(void)
Get the default foreground color.
int iSplit
reserved - position for 'split' (-1 for 'no split')
void FWSetFocusWindow(WBFrameWindow *pFrameWindow, WBChildFrame *pCont)
Sets the focus to a specific contained window using the Window ID.
void(* pgup)(WBChildFrame *, int iACS)
'page up' navigation.
int fFlags
various bitflags defining features. See WBChildFrame_FLAGS enum.
void(* properties)(WBChildFrame *)
display the property sheet for the displayed document (optional)
XColor FWGetDefaultBD(void)
Get the default border color.
WB_SCROLLINFO scroll
'scroll info' (horizontal and vertical min/max/pos and other details)
const Atom aTAB_MESSAGE
command sent by Client Message related to 'tab' operations
void(* del)(WBChildFrame *, int iACS)
'delete' char under cursor (delete equivalent), or perform related 'delete' operation via ctrl/alt/sh...
RESERVED - bit mask for 'splitter' flags.
void(* copy_to_cb)(WBChildFrame *)
copy selection to clipboard
WB_POINT origin
viewport 'origin' in 'client units' (such as chars and lines) - determines scroll behavior
WB_EXTENT extent
viewport 'extent' in 'client units' (such as chars and lines) - determines scroll behavior
void(* select_none)(WBChildFrame *)
select none
int FWAddContainedWindow(WBFrameWindow *pFrameWindow, WBChildFrame *pNew)
Adds a 'contained' window and returns the tab order index.
RESERVED - 'splitter' window with vertical sizeable 'split'.
void FWSetFocusWindowIndex(WBFrameWindow *pFrameWindow, int iIndex)
Sets the focus to a specific contained window using its tab order index.
int FWGetNumContWindows(const WBFrameWindow *pFrameWindow)
Returns the total number of 'contained' windows.
void FWSetUserCallback(WBFrameWindow *pFW, WBWinEvent pCallBack)
assign a new WBWinEvent callback function for a frame window
use PIXELS instead of characters and lines to define the viewport
int iClientX
The current X position of the frame window's client area (relative to the window)
void(* downarrow)(WBChildFrame *, int iACS)
'down' arrow navigation.
int(* can_undo)(WBChildFrame *)
returns non-zero value if 'can undo'
char * szStatusText
Status text ('WBAlloc'd) to display when this child frame window has the input focus....
int iRowHeight
cached 'row height' (height of line including interline spacing)
WB_PCSTR(* get_file_name)(WBChildFrame *)
get a (const) pointer to the file name string
WB_SCROLLINFO scrollSplit
reserved - 'scroll info' for 'split' area (implementation-defined)
void(* scroll_vert)(WBChildFrame *, int iMode, int iValue)
'scroll vertical' notification.
void(* mouse_drop)(WBChildFrame *, int iX, int iY, int iButtonMask, int iACS)
'mouse drop' (drag end) notification.
represents a 'break' (marks end of a column)
int(* UIcallback)(WBMenu *, WBMenuItem *)
menu 'UI' callback to handle displaying menu states.
mask for the actual tab value
struct tagWB_FRAME_WINDOW WBFrameWindow
main controlling structure for frame windows
WB_GEOM geom
total client-area geometry (excludes scroll bars) in 'pixels'
void FWSetStatusTabInfo(WBFrameWindow *pFrameWindow, int nTabs, const int *pTabs)
Sets the 'status' tab info for a Frame Window with a status bar.
int iClientHeight
The current height of the frame window's client area.
void(* destructor)(struct tagWBChildFrame *)
pointer to a 'superclass' destructor. If not NULL, will be called by FWDestroyChildFrame()
void(* select_all)(WBChildFrame *)
select all
void(* save)(WBChildFrame *, const char *szFileName)
save to specified file name
unsigned int ulTag
tag indicating I'm a 'Child Frame' window
int(* has_selection)(WBChildFrame *)
returns non-zero value if there is a selection
int iClientWidth
The current width of the frame window's client area.
int(* WBWinEvent)(Window wID, XEvent *pEvent)
event callback function type for window events
int iContextMenuID
menu ID (from pszMenuResource or owning frame's menu) for context popup, -1 if none
internal wrapper struct for 'extent' definition
XColor FWGetDefaultBG(void)
Get the default background color.
void(* redo)(WBChildFrame *)
perform a re-do
main controlling structure for frame windows
void(* paste_from_cb)(WBChildFrame *)
paste from clipboard
bit flag to 'right justify' the column location
int(* is_ins_mode)(WBChildFrame *)
Use this to determine whether you are in 'insert' or 'overwrite' mode.
void(* mouse_dblclick)(WBChildFrame *, int iX, int iY, int iButtonMask, int iACS)
'mouse double click' notification.
int(* is_empty)(WBChildFrame *)
returns non-zero value if contents are 'empty'
int(* callback)(XClientMessageEvent *)
menu callback (gets pointer to the 'XClientMessageEvent').
WBFrameWindow * pOwner
a pointer to the WBFrameWindow owner
WBChildFrame * FWGetContainedWindowByIndex(const WBFrameWindow *pFrameWindow, int iIndex)
Returns the Window ID for the specified 'contained' window. The index follows the tab order.
RESERVED - bit set if split cannot be sized with the mouse.
void(* scroll_horiz)(WBChildFrame *, int iMode, int iValue)
'scroll vertical' notification.
int iColWidth
cached 'column width' (width of 1 character)
unsigned int ulTag
tag indicating I'm a frame window
void(* pgdown)(WBChildFrame *, int iACS)
'page down' navigation.
void(* enter)(WBChildFrame *, int iACS)
'enter' char, or 'enter' for navigation.
struct tagWBChildFrameUI WBChildFrameUI
Structure that defines a Child Frame's UI, mainly for a 'superclass'.
center text within the column
void(* rightarrow)(WBChildFrame *, int iACS)
'right' arrow navigation.
void(* mouse_drag)(WBChildFrame *, int iX, int iY, int iButtonMask, int iACS)
'mouse drag' (begin) notification.
WBChildFrame_FLAGS
enumeration for 'fFlags' member of WBChildFrame
An allocated structure containing XFontStruct, XFontInfo, and XftFont [as applicable] for a specified...
void(* end)(WBChildFrame *, int iACS)
'end' arrow navigation.
int(* can_redo)(WBChildFrame *)
returns non-zero value if 'can redo'
WBFrameWindow * FWCreateFrameWindow(const char *szTitle, int idIcon, const char *szMenuResource, int iX, int iY, int iWidth, int iHeight, WBWinEvent pUserCallback, int iFlags)
Create a frame window.
struct tagWBChildFrame WBChildFrame
Structure that defines a Child Frame within a Frame Window.
set this to enable a 'status bar' at the bottom
internal wrapper struct for 'point' definition
Structure that defines a Child Frame within a Frame Window.
Structure that defines a Child Frame's UI, mainly for a 'superclass'.
void FWSetStatusText(WBFrameWindow *pFrameWindow, const char *szText)
Sets the 'status' text for a Frame Window with a status bar, forcing a re-paint.
void(* uparrow)(WBChildFrame *, int iACS)
'up' arrow navigation.
reserved: unspecified new justification method
void FWMoveChildFrameTabIndex(WBFrameWindow *pFrameWindow, WBChildFrame *pCont, int iIndex)
Sets the specific contained window to a particular index in the tab order.
Atom aImageAtom
'image' atom for display in tabs. default is 'None'. You should not alter this member directly.
char * szDisplayName
display name shown in tab and title bar. You should not alter this member directly.
struct tagWBChildFrameUI * pUI
pointer to 'WBChildFrameUI' function pointer table (assigned by 'superclass')
void(* cut_to_cb)(WBChildFrame *)
delete selection, copying to clipboard first
char * pszMenuResource
resource string for this child frame's menu (NULL = 'use default')
void(* hover_notify)(WBChildFrame *, int x, int y)
'mouse hover' notification
void(* mouse_click)(WBChildFrame *, int iX, int iY, int iButtonMask, int iACS)
'mouse click' notification.
WB_FONT pFont
default font for the window
void(* mouse_move)(WBChildFrame *, int iX, int iY)
'mouse motion' notification.