X11workbench Toolkit
1.0
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <memory.h>
#include <string.h>
#include <strings.h>
#include <errno.h>
#include <X11/Xlib.h>
#include "window_dressing.h"
#include "pixmap_helper.h"
#include "conf_help.h"
#include "draw_text.h"
Go to the source code of this file.
Macros | |
#define | COPY_COLOR_NAME(X, Y, Z) {const char *pX = X(WBGetDefaultDisplay()); if(pX) strncpy(Y,pX,sizeof(Y)); else strncpy(Y,Z,sizeof(Y));} |
macro to get a color name or use default if it does not exist in settings | |
Functions | |
static void | CheckInitScrollColors (void) |
internal utility to check and initialize scroll bar standard colors | |
static void | DebugDumpScrollInfo (WB_SCROLLINFO *pSI) |
int | WBSetVScrollRange (WB_SCROLLINFO *pSI, int iMin, int iMax) |
Set the scroll range for a vertical scrollbar in the WB_SCROLLINFO structure. More... | |
int | WBSetHScrollRange (WB_SCROLLINFO *pSI, int iMin, int iMax) |
Set the scroll range for a horizontal scrollbar in the WB_SCROLLINFO structure. More... | |
void | WBSetVScrollPos (WB_SCROLLINFO *pSI, int iPos) |
Set the scroll range for a vertical scrollbar in the WB_SCROLLINFO structure. More... | |
void | WBSetHScrollPos (WB_SCROLLINFO *pSI, int iPos) |
Set the scroll range for a horizontal scrollbar in the WB_SCROLLINFO structure. More... | |
static int | InternalNotifySelf (Window wID, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4) |
static void | InternalCalcVScrollBar (WB_SCROLLINFO *pScrollInfo, WB_GEOM *pgeomClient, int iVScrollWidth, int iHScrollHeight) |
static void | InternalCalcHScrollBar (WB_SCROLLINFO *pScrollInfo, WB_GEOM *pgeomClient, int iVScrollWidth, int iHScrollHeight) |
void | WBCalcVScrollBar (WB_SCROLLINFO *pScrollInfo, WB_GEOM *pgeomClient, int iVScrollWidth, int iHScrollHeight, int nListItems, int nPos) |
Calculate the parameters for a vertical scroll bar. More... | |
void | WBCalcHScrollBar (WB_SCROLLINFO *pScrollInfo, WB_GEOM *pgeomClient, int iVScrollWidth, int iHScrollHeight, int nListItems, int nPos) |
Calculate the parameters for a horizontal scroll bar. More... | |
int | WBCalcVScrollDragPos (WB_SCROLLINFO *pScrollInfo, int iY) |
Calculate and assign the correct vertical scroll bar position from mouse coordinates. More... | |
int | WBCalcHScrollDragPos (WB_SCROLLINFO *pScrollInfo, int iX) |
Calculate and assign the correct horizontal scroll bar position from mouse coordinates. More... | |
void | WBUpdateScrollBarGeometry (WB_SCROLLINFO *pSI, WB_FONTC pFont, WB_GEOM *pgeomClient, WB_GEOM *pgeomUsable) |
Update the scroll bar geometry within the WB_SCROLLINFO structure. More... | |
void | WBInvalidateVScrollGeom (Window wID, WB_SCROLLINFO *pScrollInfo, int bAll, int bUpdate) |
Utility function to invalidate the geometry for the vertical scroll bar. More... | |
void | WBInvalidateHScrollGeom (Window wID, WB_SCROLLINFO *pScrollInfo, int bAll, int bUpdate) |
Utility function to invalidate the geometry for the horizontal scroll bar. More... | |
int | WBScrollBarEvent (Window wID, XEvent *pEvent, WB_SCROLLINFO *pScrollInfo) |
Event handler for scroll bars. More... | |
void | WBPaintHScrollBar (WB_SCROLLINFO *pScrollInfo, Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomClient) |
Paint the horizontal scroll bar within a window based on WB_SCROLLINFO. More... | |
void | WBPaintVScrollBar (WB_SCROLLINFO *pScrollInfo, Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomClient) |
Paint the vertical scroll bar within a window based on WB_SCROLLINFO. More... | |
void | WBDrawBorderRect (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomBorder, unsigned long lBorderColor) |
Draw a 'border' rectangle. More... | |
void | WBDraw3DBorderRect (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomBorder, unsigned long lBorderColor1, unsigned long lBorderColor2) |
Draw a 3D 'border' rectangle. More... | |
void | WBDrawBorderElipse (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomBorder, unsigned long lBorderColor) |
Draw a 'border' elipse within a bounding geometry. More... | |
void | WBDraw3DBorderElipse (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomBorder, unsigned long lBorderColor1, unsigned long lBorderColor2) |
Draw a 3D 'border' elipse within a bounding geometry. More... | |
void | WBDrawDashedRect (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomRect, unsigned long lColor) |
Draw a 'dashed' rectangle. More... | |
void | WBDrawLeftArrow (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomRect, unsigned long lColor) |
Draw a left arrow in a window within a specified geometry. More... | |
void | WBDrawUpArrow (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomRect, unsigned long lColor) |
Draw an up arrow in a window within a specified geometry. More... | |
void | WBDrawRightArrow (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomRect, unsigned long lColor) |
Draw a right arrow in a window within a specified geometry. More... | |
void | WBDrawDownArrow (Display *pDisplay, Drawable wID, WBGC gc, WB_GEOM *pgeomRect, unsigned long lColor) |
Draw a down arrow in a window within a specified geometry. More... | |
void | WBDraw3DBorderTab (Display *pDisplay, Drawable dw, WBGC gc, WB_GEOM *pgeomOutline, int fFocus, unsigned long lFGColor, unsigned long lBGColor, unsigned long lBorderColor1, unsigned long lBorderColor2, unsigned long lHighlightColor, WB_FONTC pFont, WB_FONTC pFontBold, Atom aGraphic, const char *szText) |
Draw a 'tab' within a specified 'outline' rectangle. More... | |
Variables | |
static XColor | clrScrollFG |
foreground scroll bar color | |
static XColor | clrScrollBG |
background scroll bar color | |
static XColor | clrScrollAFG |
active foreground scroll bar color | |
static XColor | clrScrollABG |
active background scroll bar color | |
static XColor | clrScrollHFG |
highlight foreground scroll bar color | |
static XColor | clrScrollHBG |
highlight background scroll bar color | |
static XColor | clrScrollBD |
standard scroll bar border color | |
static XColor | clrScrollBD2 |
3D highlight scroll bar border color (light) | |
static XColor | clrScrollBD3 |
3D highlight scroll bar border color (dark) | |
static int | iInitScrollColorFlag |
initialization flag for scroll colors. when zero, colors not yet initialized | |
Utilities for painting and handling standard components of windows
Definition in file window_dressing.c.