mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Added new wruler.{c,h} files from nwanua
This commit is contained in:
760
WINGs/wruler.c
760
WINGs/wruler.c
@@ -1,169 +1,34 @@
|
|||||||
|
|
||||||
/* WMRuler: nifty ruler widget for WINGs (OK, for WMText ;-) */
|
|
||||||
/* Copyleft (>) 1999, 2000 Nwanua Elumeze <nwanua@colorado.edu> */
|
|
||||||
|
|
||||||
|
|
||||||
#include <WINGsP.h>
|
|
||||||
#include <WUtil.h>
|
|
||||||
#include <WMaker.h>
|
|
||||||
|
|
||||||
#include "wruler.h"
|
#include "wruler.h"
|
||||||
|
|
||||||
#define DEFAULT_X_OFFSET 22
|
#define MIN_DOC_WIDTH 10
|
||||||
#define MIN_DOC_WIDTH 200
|
|
||||||
#define DEFAULT_RULER_WIDTH 240
|
|
||||||
#define DEFAULT_RULER_HEIGHT 40
|
|
||||||
|
|
||||||
|
|
||||||
/* a pixel is defined here as 1/8 of an "inch" */
|
|
||||||
/* an "inch" is not the British unit inch... just so you know :-P */
|
|
||||||
|
|
||||||
typedef struct W_Ruler {
|
typedef struct W_Ruler {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
W_View *view;
|
W_View *view;
|
||||||
|
W_View *pview; /* the parent's view (for drawing the line) */
|
||||||
|
|
||||||
W_View *pview;
|
WMAction *moveAction; /* what to when while moving */
|
||||||
|
WMAction *releaseAction; /* what to do when released */
|
||||||
void *clientData;
|
void *clientData;
|
||||||
WMAction *action, *moveaction;
|
|
||||||
|
|
||||||
struct {
|
GC fg, bg;
|
||||||
int left, body, first, right, dleft;
|
WMFont *font;
|
||||||
} margins;
|
WMRulerMargins margins;
|
||||||
int which_marker;
|
|
||||||
|
|
||||||
int end;
|
|
||||||
int pressed;
|
|
||||||
int offset;
|
int offset;
|
||||||
|
int motion; /* the position of the _moving_ marker(s) */
|
||||||
|
int end; /* the last tick on the baseline (restrict markers to it) */
|
||||||
|
|
||||||
|
Pixmap drawBuffer;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned int showtabs:1;
|
|
||||||
unsigned int buttonPressed:1;
|
unsigned int buttonPressed:1;
|
||||||
|
/* 0, 1, 2, 3, 4, 5, 6 */
|
||||||
|
unsigned int whichMarker:3; /* none, left, right, first, body, tabstop, both */
|
||||||
|
unsigned int RESERVED:28;
|
||||||
} flags;
|
} flags;
|
||||||
|
|
||||||
} Ruler;
|
} Ruler;
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
resizeRuler(W_ViewDelegate *self, WMView *view)
|
|
||||||
{
|
|
||||||
Ruler *rPtr = (Ruler *)view->self;
|
|
||||||
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
|
||||||
|
|
||||||
W_ResizeView(rPtr->view, view->size.width,
|
|
||||||
DEFAULT_RULER_HEIGHT); /* more like DEFACTO_RULER_HEIGHT ;-) */
|
|
||||||
|
|
||||||
rPtr->end = view->size.width;
|
|
||||||
rPtr->margins.right = view->size.width;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
W_ViewDelegate _RulerViewDelegate =
|
|
||||||
{
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
resizeRuler,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
paintRuler(Ruler *rPtr)
|
|
||||||
{
|
|
||||||
GC gc;
|
|
||||||
XPoint points[6];
|
|
||||||
WMFont *font;
|
|
||||||
int i, j, xpos;
|
|
||||||
char c[3];
|
|
||||||
int actual_x;
|
|
||||||
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
|
||||||
|
|
||||||
if(!rPtr->view->flags.mapped)
|
|
||||||
return;
|
|
||||||
|
|
||||||
gc = WMColorGC(WMBlackColor(rPtr->view->screen));
|
|
||||||
font = WMSystemFontOfSize(rPtr->view->screen, 8);
|
|
||||||
|
|
||||||
|
|
||||||
WMDrawString(rPtr->view->screen, rPtr->view->window, gc,
|
|
||||||
font, rPtr->margins.dleft+2, 25, "0 inches", 10);
|
|
||||||
|
|
||||||
/* marker ticks */
|
|
||||||
j=0;
|
|
||||||
for(i=80; i<rPtr->view->size.width; i+=80) {
|
|
||||||
if(j<10)
|
|
||||||
snprintf(c,3,"%d",++j);
|
|
||||||
else
|
|
||||||
snprintf(c,3,"%2d",++j);
|
|
||||||
WMDrawString(rPtr->view->screen, rPtr->view->window, gc,
|
|
||||||
font, rPtr->margins.dleft+2+i, 25, c, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(rPtr->flags.showtabs){
|
|
||||||
points[0].y = 9;
|
|
||||||
points[1].y = 15;
|
|
||||||
points[2].y = 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i=0; i<rPtr->view->size.width; i+=40) {
|
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
gc, rPtr->margins.dleft+i, 21, rPtr->margins.dleft+i, 31);
|
|
||||||
|
|
||||||
if(rPtr->flags.showtabs){
|
|
||||||
points[0].x = rPtr->margins.dleft+i+40;
|
|
||||||
points[1].x = points[0].x+6;
|
|
||||||
points[2].x = points[0].x;
|
|
||||||
XFillPolygon (rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
WMColorGC(WMDarkGrayColor(rPtr->view->screen)),
|
|
||||||
points, 3, Convex, CoordModeOrigin);
|
|
||||||
|
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
WMColorGC(WMDarkGrayColor(rPtr->view->screen)),
|
|
||||||
rPtr->margins.dleft+i, 18, rPtr->margins.dleft+i, 21);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i=0; i<rPtr->view->size.width; i+=20)
|
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
gc, rPtr->margins.dleft+i, 21, rPtr->margins.dleft+i, 27);
|
|
||||||
|
|
||||||
for(i=0; i<rPtr->view->size.width-20; i+=10)
|
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
gc, rPtr->margins.dleft+i, 21, rPtr->margins.dleft+i, 24);
|
|
||||||
|
|
||||||
/* guide the end marker in future drawings till next resize */
|
|
||||||
rPtr->end = i+12;
|
|
||||||
|
|
||||||
/* base line */
|
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
gc, rPtr->margins.dleft, 21, rPtr->margins.left+i-10, 21);
|
|
||||||
|
|
||||||
|
|
||||||
/* Marker for right margin
|
|
||||||
|
|
||||||
/|
|
|
||||||
/ |
|
|
||||||
/__|
|
|
||||||
|
|
|
||||||
| */
|
|
||||||
|
|
||||||
xpos = rPtr->margins.right;
|
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
WMColorGC(WMDarkGrayColor(rPtr->view->screen)), xpos, 10, xpos, 20);
|
|
||||||
|
|
||||||
points[0].x = xpos+1;
|
|
||||||
points[0].y = 2;
|
|
||||||
points[1].x = points[0].x-6;
|
|
||||||
points[1].y = 9;
|
|
||||||
points[2].x = points[0].x-6;
|
|
||||||
points[2].y = 11;
|
|
||||||
points[3].x = points[0].x;
|
|
||||||
points[3].y = 11;
|
|
||||||
XFillPolygon (rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
gc, points, 4, Convex, CoordModeOrigin);
|
|
||||||
|
|
||||||
|
|
||||||
/* Marker for left margin
|
/* Marker for left margin
|
||||||
|
|
||||||
@@ -172,308 +37,350 @@ paintRuler(Ruler *rPtr)
|
|||||||
|__\
|
|__\
|
||||||
|
|
|
|
||||||
| */
|
| */
|
||||||
|
static void
|
||||||
|
drawLeftMarker(Ruler *rPtr)
|
||||||
|
{
|
||||||
|
XPoint points[4];
|
||||||
|
int xpos = (rPtr->flags.whichMarker==1?
|
||||||
|
rPtr->motion:rPtr->margins.left);
|
||||||
|
|
||||||
xpos = rPtr->margins.left;
|
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
rPtr->fg, xpos, 8, xpos, 22);
|
||||||
WMColorGC(WMDarkGrayColor(rPtr->view->screen)), xpos, 10, xpos, 20);
|
|
||||||
|
|
||||||
points[0].x = xpos;
|
points[0].x = xpos;
|
||||||
points[0].y = 3;
|
points[0].y = 1;
|
||||||
points[1].x = points[0].x+6;
|
points[1].x = points[0].x+6;
|
||||||
points[1].y = 10;
|
points[1].y = 8;
|
||||||
points[2].x = points[0].x+6;
|
points[2].x = points[0].x+6;
|
||||||
points[2].y = 11;
|
points[2].y = 9;
|
||||||
points[3].x = points[0].x;
|
points[3].x = points[0].x;
|
||||||
points[3].y = 11;
|
points[3].y = 9;
|
||||||
XFillPolygon (rPtr->view->screen->display, rPtr->view->window,
|
XFillPolygon (rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
gc, points, 4, Convex, CoordModeOrigin);
|
rPtr->fg, points, 4, Convex, CoordModeOrigin);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Marker for right margin
|
||||||
|
|
||||||
|
/|
|
||||||
|
/ |
|
||||||
|
/__|
|
||||||
|
|
|
||||||
|
| */
|
||||||
|
|
||||||
|
static void
|
||||||
|
drawRightMarker(Ruler *rPtr)
|
||||||
|
{
|
||||||
|
XPoint points[4];
|
||||||
|
int xpos = (rPtr->flags.whichMarker==2?
|
||||||
|
rPtr->motion:rPtr->margins.right);
|
||||||
|
|
||||||
|
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
|
rPtr->fg, xpos, 8, xpos, 22);
|
||||||
|
points[0].x = xpos+1;
|
||||||
|
points[0].y = 0;
|
||||||
|
points[1].x = points[0].x-6;
|
||||||
|
points[1].y = 7;
|
||||||
|
points[2].x = points[0].x-6;
|
||||||
|
points[2].y = 9;
|
||||||
|
points[3].x = points[0].x;
|
||||||
|
points[3].y = 9;
|
||||||
|
XFillPolygon (rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
|
rPtr->fg, points, 4, Convex, CoordModeOrigin);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
points[3].x =
|
|
||||||
|
|
||||||
/* Marker for first line only
|
/* Marker for first line only
|
||||||
_____
|
_____
|
||||||
|___|
|
|___|
|
||||||
|
|
| */
|
||||||
|
static void
|
||||||
*/
|
drawFirstMarker(Ruler *rPtr)
|
||||||
|
{
|
||||||
xpos = rPtr->margins.first + rPtr->margins.dleft;
|
int xpos = ((rPtr->flags.whichMarker==3 || rPtr->flags.whichMarker==6)?
|
||||||
XFillRectangle(rPtr->view->screen->display, rPtr->view->window,
|
rPtr->motion:rPtr->margins.first);
|
||||||
gc, xpos-5, 7, 11, 5);
|
XFillRectangle(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
|
rPtr->fg, xpos-5, 10, 11, 5);
|
||||||
XDrawLine(rPtr->view->screen->display, rPtr->view->window,
|
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
gc, xpos, 10, xpos, 20);
|
rPtr->fg, xpos, 12, xpos, 22);
|
||||||
|
}
|
||||||
|
|
||||||
/* Marker for rest of body
|
/* Marker for rest of body
|
||||||
_____
|
_____
|
||||||
\ /
|
\ /
|
||||||
\./ */
|
\./ */
|
||||||
|
static void
|
||||||
|
drawBodyMarker(Ruler *rPtr)
|
||||||
xpos = rPtr->margins.body + rPtr->margins.dleft;
|
{
|
||||||
|
XPoint points[4];
|
||||||
|
int xpos = ((rPtr->flags.whichMarker==4 || rPtr->flags.whichMarker==6)?
|
||||||
|
rPtr->motion:rPtr->margins.body);
|
||||||
points[0].x = xpos-5;
|
points[0].x = xpos-5;
|
||||||
points[0].y = 14;
|
points[0].y = 16;
|
||||||
points[1].x = points[0].x+11;
|
points[1].x = points[0].x+11;
|
||||||
points[1].y = 14;
|
points[1].y = 16;
|
||||||
points[2].x = points[0].x+5;
|
points[2].x = points[0].x+5;
|
||||||
points[2].y = 20;
|
points[2].y = 22;
|
||||||
XFillPolygon (rPtr->view->screen->display, rPtr->view->window,
|
XFillPolygon (rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
gc, points, 3, Convex, CoordModeOrigin);
|
rPtr->fg, points, 3, Convex, CoordModeOrigin);
|
||||||
|
|
||||||
|
|
||||||
if(!rPtr->flags.buttonPressed)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* actual_x is used as a shortcut is all... */
|
|
||||||
switch(rPtr->which_marker){
|
|
||||||
case WRulerLeft: actual_x = rPtr->margins.left; break;
|
|
||||||
case WRulerBody:
|
|
||||||
actual_x = rPtr->margins.body + rPtr->margins.dleft;
|
|
||||||
break;
|
|
||||||
case WRulerFirst:
|
|
||||||
actual_x = rPtr->margins.first + rPtr->margins.dleft;
|
|
||||||
break;
|
|
||||||
case WRulerRight: actual_x = rPtr->margins.right; break;
|
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
gc = WMColorGC(WMDarkGrayColor(rPtr->view->screen)),
|
|
||||||
|
|
||||||
XSetLineAttributes(rPtr->view->screen->display, gc, 1,
|
|
||||||
LineOnOffDash, CapNotLast, JoinMiter);
|
|
||||||
|
|
||||||
XDrawLine(rPtr->pview->screen->display, rPtr->pview->window,
|
|
||||||
gc, actual_x+1, 45, actual_x+1, rPtr->pview->size.height-5);
|
|
||||||
|
|
||||||
XSetLineAttributes(rPtr->view->screen->display, gc, 1,
|
|
||||||
LineSolid, CapNotLast, JoinMiter);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static void
|
||||||
whichMarker(Ruler *rPtr, int x, int y)
|
createDrawBuffer(Ruler *rPtr)
|
||||||
{
|
{
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
if(rPtr->drawBuffer)
|
||||||
|
XFreePixmap(rPtr->view->screen->display, rPtr->drawBuffer);
|
||||||
|
rPtr->drawBuffer = XCreatePixmap(rPtr->view->screen->display,
|
||||||
|
rPtr->view->window, rPtr->view->size.width, 40,
|
||||||
|
rPtr->view->screen->depth);
|
||||||
|
XFillRectangle(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
|
rPtr->bg, 0, 0, rPtr->view->size.width, 40);
|
||||||
|
}
|
||||||
|
|
||||||
if(y>22)
|
static void
|
||||||
return;
|
drawRulerOnPixmap(Ruler *rPtr)
|
||||||
|
{
|
||||||
|
int i, j, w, m;
|
||||||
|
char c[3];
|
||||||
|
int marks[9] = {11, 3, 5, 3, 7, 3, 5, 3};
|
||||||
|
|
||||||
if(x<0)
|
if(!rPtr->drawBuffer)
|
||||||
return;
|
createDrawBuffer(rPtr);
|
||||||
|
|
||||||
if( rPtr->margins.dleft-x >= -6 && y <= 9 &&
|
XFillRectangle(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
rPtr->margins.dleft-x <=0 && y>=4)
|
rPtr->bg, 0, 0, rPtr->view->size.width, 40);
|
||||||
return WRulerLeft;
|
|
||||||
|
|
||||||
if( rPtr->margins.right-x >= -1 && y <= 11 &&
|
|
||||||
rPtr->margins.right-x <=5 && y>=4)
|
|
||||||
return WRulerRight;
|
|
||||||
|
|
||||||
x -= rPtr->margins.dleft;
|
|
||||||
if(x<0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if( rPtr->margins.first-x <= 4 && y<=12 &&
|
|
||||||
rPtr->margins.first-x >= -5 && y>=5)
|
|
||||||
return WRulerFirst;
|
|
||||||
|
|
||||||
|
|
||||||
|
WMDrawString(rPtr->view->screen, rPtr->drawBuffer,
|
||||||
|
rPtr->fg, rPtr->font, rPtr->margins.left+2, 26, "0 inches", 10);
|
||||||
|
|
||||||
if( rPtr->margins.body-x <= 4 && y<=19 &&
|
/* marker ticks */
|
||||||
rPtr->margins.body-x >= -5 && y>=15)
|
i=j=m=0;
|
||||||
return WRulerBody;
|
w = rPtr->view->size.width - rPtr->margins.left;
|
||||||
|
while(m < w) {
|
||||||
|
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
|
rPtr->fg, rPtr->margins.left+m, 23,
|
||||||
|
rPtr->margins.left+m, marks[i%8]+23);
|
||||||
|
if(i!=0 && i%8==0) {
|
||||||
|
if(j<10)
|
||||||
|
snprintf(c,3,"%d",++j);
|
||||||
|
else
|
||||||
|
snprintf(c,3,"%2d",++j);
|
||||||
|
WMDrawString(rPtr->view->screen, rPtr->drawBuffer,
|
||||||
|
rPtr->fg, rPtr->font, rPtr->margins.left+2+m, 26, c, 2);
|
||||||
|
}
|
||||||
|
m = (++i)*10;
|
||||||
|
}
|
||||||
|
|
||||||
|
rPtr->end = rPtr->margins.left+m-10;
|
||||||
|
if(rPtr->margins.right > rPtr->end)
|
||||||
|
rPtr->margins.right = rPtr->end;
|
||||||
|
/* base line */
|
||||||
|
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
|
rPtr->fg, rPtr->margins.left, 22, rPtr->margins.left+m-10, 22);
|
||||||
|
|
||||||
/* both first and body? */
|
drawLeftMarker(rPtr);
|
||||||
if( rPtr->margins.first-x <= 4 && rPtr->margins.first-x >= -5
|
drawRightMarker(rPtr);
|
||||||
&& rPtr->margins.body-x <= 4 && rPtr->margins.body-x >= -5
|
drawFirstMarker(rPtr);
|
||||||
&& y>=13 && y<=14)
|
drawBodyMarker(rPtr);
|
||||||
return WRulerBoth;
|
}
|
||||||
|
|
||||||
return -1;
|
static void
|
||||||
|
paintRuler(Ruler *rPtr)
|
||||||
|
{
|
||||||
|
WMScreen *screen = rPtr->view->screen;
|
||||||
|
if(1||!rPtr->drawBuffer) { //first exposure
|
||||||
|
drawRulerOnPixmap(rPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
XCopyArea(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
|
rPtr->view->window, rPtr->bg, 0, 0, rPtr->view->size.width, 40,
|
||||||
|
0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
verifyMarkerMove(Ruler *rPtr, int x)
|
verifyMarkerMove(Ruler *rPtr, int x)
|
||||||
{
|
{
|
||||||
if(!rPtr)
|
if(rPtr->flags.whichMarker<1 || rPtr->flags.whichMarker>6)
|
||||||
return;
|
return False;
|
||||||
|
|
||||||
switch(rPtr->which_marker){
|
switch(rPtr->flags.whichMarker) {
|
||||||
case WRulerLeft:
|
case 1:
|
||||||
if(x < rPtr->margins.right-MIN_DOC_WIDTH &&
|
if( x > rPtr->margins.right - 10
|
||||||
rPtr->margins.body + x <= rPtr->margins.right-MIN_DOC_WIDTH &&
|
|| rPtr->margins.body + x > rPtr->margins.right-MIN_DOC_WIDTH
|
||||||
rPtr->margins.first + x <= rPtr->margins.right-MIN_DOC_WIDTH)
|
|| rPtr->margins.first + x > rPtr->margins.right-MIN_DOC_WIDTH
|
||||||
rPtr->margins.left = x;
|
|| x < rPtr->offset)
|
||||||
else return False;
|
return False;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
case WRulerBody:
|
if( x < rPtr->margins.first+MIN_DOC_WIDTH
|
||||||
if(x < rPtr->margins.right-MIN_DOC_WIDTH && x >= rPtr->margins.left)
|
|| x < rPtr->margins.body+MIN_DOC_WIDTH
|
||||||
rPtr->margins.body = x - rPtr->margins.dleft;
|
|| x < rPtr->margins.left+MIN_DOC_WIDTH
|
||||||
else return False;
|
|| x > rPtr->end) //rPtr->view->size.width)
|
||||||
|
return False;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WRulerFirst:
|
case 3:
|
||||||
if(x < rPtr->margins.right-MIN_DOC_WIDTH && x >= rPtr->margins.left)
|
if( x >= rPtr->margins.right-MIN_DOC_WIDTH
|
||||||
rPtr->margins.first = x - rPtr->margins.dleft;
|
|| x < rPtr->margins.left)
|
||||||
else return False;
|
return False;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WRulerRight:
|
case 4:
|
||||||
if( x >= rPtr->margins.first+MIN_DOC_WIDTH &&
|
if( x >= rPtr->margins.right-MIN_DOC_WIDTH
|
||||||
x >= rPtr->margins.body+MIN_DOC_WIDTH &&
|
|| x < rPtr->margins.left)
|
||||||
x >= rPtr->margins.left+MIN_DOC_WIDTH &&
|
return False;
|
||||||
x <= rPtr->end)
|
|
||||||
rPtr->margins.right = x;
|
|
||||||
else return False;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WRulerBoth:
|
case 6:
|
||||||
if( x < rPtr->margins.right-MIN_DOC_WIDTH && x >= rPtr->margins.left) {
|
if( x >= rPtr->margins.right-MIN_DOC_WIDTH
|
||||||
rPtr->margins.first = x - rPtr->margins.dleft;
|
|| x < rPtr->margins.left)
|
||||||
rPtr->margins.body = x - rPtr->margins.dleft;
|
return False;
|
||||||
} else return False;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default : return False;
|
default: return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rPtr->motion = x;
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static int
|
||||||
moveMarker(Ruler *rPtr, int x)
|
whichMarker(Ruler *rPtr, int x, int y)
|
||||||
{
|
{
|
||||||
|
if(x<rPtr->offset || y>22)
|
||||||
|
return 0;
|
||||||
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
if( rPtr->margins.left-x >= -6 && y <= 9
|
||||||
|
&& (rPtr->margins.left-x <=0) && y>=4) {
|
||||||
|
rPtr->motion = rPtr->margins.left;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if(x < rPtr->offset || x > rPtr->end)
|
if(rPtr->margins.right-x >= -1 && y <= 11
|
||||||
return;
|
&& rPtr->margins.right-x <=5 && y>=4) {
|
||||||
|
rPtr->motion = rPtr->margins.right;
|
||||||
/* restrictive ticks */
|
return 2;
|
||||||
/*
|
}
|
||||||
if(x%10-2 != 0)
|
|
||||||
return;
|
|
||||||
*/
|
|
||||||
if(!verifyMarkerMove(rPtr, x))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* clear around the motion area */
|
|
||||||
#if 0
|
|
||||||
XClearWindow(rPtr->view->screen->display, rPtr->view->window);
|
|
||||||
#else
|
|
||||||
|
|
||||||
XClearArea(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
x-10, 3, 20, rPtr->view->size.height-4, False);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
{ //while(1) {
|
/* both first and body? */
|
||||||
if (QLength(rPtr->view->screen->display) > 0 ) {
|
if( rPtr->margins.first-x <= 4 && rPtr->margins.first-x >= -5
|
||||||
XEvent * event;
|
&& rPtr->margins.body-x <= 4 && rPtr->margins.body-x >= -5
|
||||||
while(QLength(rPtr->view->screen->display) > 0 ) {
|
&& y>=15 && y<=17) {
|
||||||
XNextEvent(rPtr->view->screen->display, event);
|
rPtr->motion = rPtr->margins.first;
|
||||||
if(event->type == MotionNotify ||
|
return 6;
|
||||||
event->type == ButtonRelease)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(rPtr->margins.first-x <= 4 && y<=15
|
||||||
|
&& rPtr->margins.first-x >= -5 && y>=10) {
|
||||||
|
rPtr->motion = rPtr->margins.first;
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( rPtr->margins.body-x <= 4 && y<=21 &&
|
||||||
|
rPtr->margins.body-x >= -5 && y>=17) {
|
||||||
|
rPtr->motion = rPtr->margins.body;
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rPtr->pressed = x;
|
/* do tabs (5)*/
|
||||||
|
|
||||||
if(rPtr->moveaction)
|
|
||||||
(rPtr->moveaction)(rPtr, rPtr->clientData);
|
|
||||||
|
|
||||||
paintRuler(rPtr);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handleEvents(XEvent *event, void *data)
|
handleEvents(XEvent *event, void *data)
|
||||||
{
|
{
|
||||||
Ruler *rPtr = (Ruler*)data;
|
Ruler *rPtr = (Ruler*)data;
|
||||||
|
Display *dpy = event->xany.display;
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
|
||||||
|
|
||||||
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
|
|
||||||
case Expose:
|
case Expose:
|
||||||
if(event->xexpose.count)
|
|
||||||
break;
|
|
||||||
if(rPtr->view->flags.realized)
|
|
||||||
paintRuler(rPtr);
|
paintRuler(rPtr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MotionNotify:
|
||||||
|
if(rPtr->flags.buttonPressed
|
||||||
|
&& (event->xmotion.state & Button1Mask)) {
|
||||||
|
if(verifyMarkerMove(rPtr, event->xmotion.x)){
|
||||||
|
GC gc = WMColorGC(WMDarkGrayColor(rPtr->view->screen));
|
||||||
|
paintRuler(rPtr);
|
||||||
|
if(rPtr->moveAction)
|
||||||
|
(rPtr->moveAction)(rPtr, rPtr->clientData);
|
||||||
|
XSetLineAttributes(rPtr->view->screen->display, gc, 1,
|
||||||
|
LineSolid, CapNotLast, JoinMiter);
|
||||||
|
XDrawLine(rPtr->pview->screen->display,
|
||||||
|
rPtr->pview->window,
|
||||||
|
gc, rPtr->motion+1, 40,
|
||||||
|
rPtr->motion+1, rPtr->pview->size.height-5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
if(event->xbutton.button != Button1)
|
if(event->xbutton.button != Button1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rPtr->flags.buttonPressed = True;
|
rPtr->flags.buttonPressed = True;
|
||||||
rPtr->which_marker =
|
rPtr->flags.whichMarker =
|
||||||
whichMarker(rPtr, event->xmotion.x,
|
whichMarker(rPtr, event->xmotion.x,
|
||||||
event->xmotion.y);
|
event->xmotion.y);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* clear around the clicked area */
|
|
||||||
if(rPtr->which_marker>=0 && rPtr->which_marker <= 4) {
|
|
||||||
|
|
||||||
XClearArea(rPtr->view->screen->display, rPtr->view->window,
|
|
||||||
WMGetRulerMargin(rPtr, rPtr->which_marker)-10, 2, 20, 21, True);
|
|
||||||
|
|
||||||
paintRuler(rPtr);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
paintRuler(rPtr);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
if(event->xbutton.button != Button1)
|
if(event->xbutton.button != Button1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rPtr->flags.buttonPressed = False;
|
rPtr->flags.buttonPressed = False;
|
||||||
rPtr->pressed = event->xmotion.x;
|
switch(rPtr->flags.whichMarker) {
|
||||||
if(rPtr->which_marker == 0) {
|
case 1: {
|
||||||
rPtr->margins.dleft = rPtr->margins.left;
|
int change = rPtr->margins.left-rPtr->motion;
|
||||||
|
rPtr->margins.first -=change;
|
||||||
/* clear entire (moved) ruler */
|
rPtr->margins.body -= change;
|
||||||
XClearArea(rPtr->view->screen->display,
|
rPtr->margins.left = rPtr->motion;
|
||||||
rPtr->view->window, 0, 0, rPtr->view->size.width,
|
paintRuler(rPtr); break;
|
||||||
rPtr->view->size.height, True);
|
|
||||||
}
|
}
|
||||||
|
case 2: rPtr->margins.right = rPtr->motion; break;
|
||||||
if(rPtr->action)
|
case 3: rPtr->margins.first = rPtr->motion; break;
|
||||||
(rPtr->action)(rPtr, rPtr->clientData);
|
case 4: rPtr->margins.body = rPtr->motion; break;
|
||||||
|
case 6: rPtr->margins.first = rPtr->margins.body
|
||||||
paintRuler(rPtr);
|
= rPtr->motion; break;
|
||||||
break;
|
|
||||||
|
|
||||||
case MotionNotify:
|
|
||||||
if(rPtr->flags.buttonPressed &&
|
|
||||||
(event->xmotion.state & Button1Mask)) {
|
|
||||||
moveMarker(rPtr, event->xmotion.x);
|
|
||||||
}
|
}
|
||||||
|
if(rPtr->releaseAction)
|
||||||
|
(rPtr->releaseAction)(rPtr, rPtr->clientData);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
rulerDidResize(W_ViewDelegate *self, WMView *view)
|
||||||
|
{
|
||||||
|
Ruler *rPtr = (Ruler *)view->self;
|
||||||
|
|
||||||
|
createDrawBuffer(rPtr);
|
||||||
|
paintRuler(rPtr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
W_ViewDelegate _RulerViewDelegate =
|
||||||
|
{
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
rulerDidResize,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
WMRuler *
|
WMRuler *
|
||||||
WMCreateRuler(WMWidget *parent)
|
WMCreateRuler(WMWidget *parent)
|
||||||
{
|
{
|
||||||
Ruler *rPtr = wmalloc(sizeof(Ruler));
|
Ruler *rPtr = wmalloc(sizeof(Ruler));
|
||||||
|
unsigned int w = WMWidgetWidth(parent);
|
||||||
|
|
||||||
memset(rPtr, 0, sizeof(Ruler));
|
memset(rPtr, 0, sizeof(Ruler));
|
||||||
|
|
||||||
@@ -486,7 +393,9 @@ WMCreateRuler(WMWidget *parent)
|
|||||||
}
|
}
|
||||||
rPtr->view->self = rPtr;
|
rPtr->view->self = rPtr;
|
||||||
|
|
||||||
W_ResizeView(rPtr->view, DEFAULT_RULER_WIDTH, DEFAULT_RULER_HEIGHT);
|
rPtr->drawBuffer = (Pixmap) NULL;
|
||||||
|
|
||||||
|
W_ResizeView(rPtr->view, w, 40);
|
||||||
|
|
||||||
WMCreateEventHandler(rPtr->view, ExposureMask|StructureNotifyMask
|
WMCreateEventHandler(rPtr->view, ExposureMask|StructureNotifyMask
|
||||||
|EnterWindowMask|LeaveWindowMask|FocusChangeMask
|
|EnterWindowMask|LeaveWindowMask|FocusChangeMask
|
||||||
@@ -495,21 +404,22 @@ WMCreateRuler(WMWidget *parent)
|
|||||||
|
|
||||||
rPtr->view->delegate = &_RulerViewDelegate;
|
rPtr->view->delegate = &_RulerViewDelegate;
|
||||||
|
|
||||||
rPtr->which_marker = WRulerLeft; /* none */
|
rPtr->bg = WMColorGC(WMGrayColor(rPtr->view->screen));
|
||||||
rPtr->pressed = 0;
|
rPtr->fg = WMColorGC(WMBlackColor(rPtr->view->screen));
|
||||||
|
rPtr->font = WMSystemFontOfSize(rPtr->view->screen, 8);
|
||||||
|
|
||||||
|
rPtr->offset = 22;
|
||||||
|
rPtr->margins.left = 22;
|
||||||
|
rPtr->margins.body = 22;
|
||||||
|
rPtr->margins.first = 42;
|
||||||
|
rPtr->margins.right = (w<502?w:502);
|
||||||
|
|
||||||
rPtr->offset = DEFAULT_X_OFFSET;
|
rPtr->flags.whichMarker = 0; /* none */
|
||||||
rPtr->margins.left = DEFAULT_X_OFFSET;
|
|
||||||
rPtr->margins.dleft = DEFAULT_X_OFFSET;
|
|
||||||
rPtr->margins.body = 0; /* relative */
|
|
||||||
rPtr->margins.first = 0; /* relative */
|
|
||||||
rPtr->margins.right = 300+DEFAULT_X_OFFSET;
|
|
||||||
rPtr->end = 320+DEFAULT_X_OFFSET;
|
|
||||||
|
|
||||||
rPtr->flags.showtabs = False;
|
|
||||||
rPtr->flags.buttonPressed = False;
|
rPtr->flags.buttonPressed = False;
|
||||||
|
|
||||||
|
rPtr->moveAction = NULL;
|
||||||
|
rPtr->releaseAction = NULL;
|
||||||
|
|
||||||
rPtr->pview = W_VIEW(parent);
|
rPtr->pview = W_VIEW(parent);
|
||||||
|
|
||||||
return rPtr;
|
return rPtr;
|
||||||
@@ -517,96 +427,43 @@ WMCreateRuler(WMWidget *parent)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMShowRulerTabs(WMRuler *rPtr, Bool show)
|
WMSetRulerMargins(WMRuler *rPtr, WMRulerMargins margins)
|
||||||
{
|
{
|
||||||
if(!rPtr)
|
if(!rPtr)
|
||||||
return;
|
return;
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
rPtr->margins.left = margins.left + rPtr->offset;
|
||||||
rPtr->flags.showtabs = show;
|
rPtr->margins.right = margins.right + rPtr->offset;
|
||||||
}
|
rPtr->margins.first = margins.first + rPtr->offset;
|
||||||
|
rPtr->margins.body = margins.body + rPtr->offset;
|
||||||
void
|
rPtr->margins.tabs = margins.tabs; //for loop
|
||||||
WMSetRulerMargin(WMRuler *rPtr, int which, int pixels)
|
|
||||||
{
|
|
||||||
if(!rPtr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
|
||||||
if(pixels<rPtr->offset)
|
|
||||||
pixels = rPtr->offset;
|
|
||||||
|
|
||||||
rPtr->which_marker = which;
|
|
||||||
if(!verifyMarkerMove(rPtr, pixels))
|
|
||||||
return;
|
|
||||||
|
|
||||||
rPtr->pressed = pixels;
|
|
||||||
if(which == WRulerLeft)
|
|
||||||
rPtr->margins.dleft = rPtr->margins.left;
|
|
||||||
|
|
||||||
if(!rPtr->view->flags.realized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
XClearArea(rPtr->view->screen->display,
|
|
||||||
rPtr->view->window, 0, 0, rPtr->view->size.width,
|
|
||||||
rPtr->view->size.height, True);
|
|
||||||
|
|
||||||
paintRuler(rPtr);
|
paintRuler(rPtr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
WMRulerMargins
|
||||||
WMGetRulerMargin(WMRuler *rPtr, int which)
|
WMGetRulerMargins(WMRuler *rPtr)
|
||||||
{
|
{
|
||||||
|
WMRulerMargins margins;
|
||||||
if(!rPtr)
|
if(!rPtr)
|
||||||
return;
|
return margins;
|
||||||
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
margins.left = rPtr->margins.left - rPtr->offset;
|
||||||
|
margins.right = rPtr->margins.right - rPtr->offset;
|
||||||
|
margins.first = rPtr->margins.first - rPtr->offset;
|
||||||
|
margins.body = rPtr->margins.body - rPtr->offset;
|
||||||
|
//for
|
||||||
|
margins.tabs = rPtr->margins.tabs;
|
||||||
|
|
||||||
switch(which) {
|
return rPtr->margins;
|
||||||
case WRulerLeft: return rPtr->margins.left; break;
|
|
||||||
case WRulerBody: return rPtr->margins.body; break;
|
|
||||||
case WRulerFirst: return rPtr->margins.first; break;
|
|
||||||
case WRulerRight: return rPtr->margins.right; break;
|
|
||||||
case WRulerBoth: return rPtr->margins.body; break;
|
|
||||||
case WRulerDocLeft: return rPtr->margins.dleft; break;
|
|
||||||
default: return rPtr->margins.dleft;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _which_ one was released */
|
|
||||||
int
|
|
||||||
WMGetReleasedRulerMargin(WMRuler *rPtr)
|
|
||||||
{
|
|
||||||
if(!rPtr)
|
|
||||||
return WRulerLeft;
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
|
||||||
if(rPtr->which_marker != -1)
|
|
||||||
return rPtr->which_marker;
|
|
||||||
else
|
|
||||||
return WRulerLeft;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* _which_ one is being grabbed */
|
|
||||||
int
|
|
||||||
WMGetGrabbedRulerMargin(WMRuler *rPtr)
|
|
||||||
{
|
|
||||||
if(!rPtr)
|
|
||||||
return WRulerLeft;
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
|
||||||
if(rPtr->which_marker != -1)
|
|
||||||
return rPtr->which_marker;
|
|
||||||
else
|
|
||||||
return WRulerLeft;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetRulerOffset(WMRuler *rPtr, int pixels)
|
WMSetRulerOffset(WMRuler *rPtr, int pixels)
|
||||||
{
|
{
|
||||||
if(!rPtr || pixels<0)
|
if(!rPtr || pixels<0 || pixels+MIN_DOC_WIDTH>=rPtr->view->size.width)
|
||||||
return;
|
return;
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
|
||||||
rPtr->offset = pixels;
|
rPtr->offset = pixels;
|
||||||
|
//rulerDidResize(rPtr, rPtr->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -614,30 +471,43 @@ WMGetRulerOffset(WMRuler *rPtr)
|
|||||||
{
|
{
|
||||||
if(!rPtr)
|
if(!rPtr)
|
||||||
return;
|
return;
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
|
||||||
return rPtr->offset;
|
return rPtr->offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetRulerAction(WMRuler *rPtr, WMAction *action, void *clientData)
|
WMSetRulerReleaseAction(WMRuler *rPtr, WMAction *action, void *clientData)
|
||||||
{
|
{
|
||||||
if(!rPtr)
|
if(!rPtr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
rPtr->releaseAction = action;
|
||||||
rPtr->action = action;
|
|
||||||
rPtr->clientData = clientData;
|
rPtr->clientData = clientData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetRulerMoveAction(WMRuler *rPtr, WMAction *moveaction, void *clientData)
|
WMSetRulerMoveAction(WMRuler *rPtr, WMAction *action, void *clientData)
|
||||||
{
|
{
|
||||||
if(!rPtr)
|
if(!rPtr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CHECK_CLASS(rPtr, WC_Ruler);
|
rPtr->moveAction = action;
|
||||||
rPtr->moveaction = moveaction;
|
|
||||||
rPtr->clientData = clientData;
|
rPtr->clientData = clientData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* _which_ one was released */
|
||||||
|
int
|
||||||
|
WMGetReleasedRulerMargin(WMRuler *rPtr)
|
||||||
|
{
|
||||||
|
if(!rPtr)
|
||||||
|
return 0;
|
||||||
|
return rPtr->flags.whichMarker;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* _which_ one is being grabbed */
|
||||||
|
int
|
||||||
|
WMGetGrabbedRulerMargin(WMRuler *rPtr)
|
||||||
|
{
|
||||||
|
if(!rPtr)
|
||||||
|
return 0;
|
||||||
|
return rPtr->flags.whichMarker;
|
||||||
|
}
|
||||||
|
|||||||
47
WINGs/wruler.h
Normal file
47
WINGs/wruler.h
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
|
||||||
|
#include <WINGs.h>
|
||||||
|
#include <WINGsP.h>
|
||||||
|
#include <WUtil.h>
|
||||||
|
|
||||||
|
//items in this file go into WINGs.h
|
||||||
|
#define WC_Ruler 16
|
||||||
|
typedef struct W_Ruler WMRuler;
|
||||||
|
|
||||||
|
/* All indentation and tab markers are _relative_ to the left margin marker */
|
||||||
|
|
||||||
|
/* a tabstop is a linked list of tabstops,
|
||||||
|
* each containing the position of the tabstop */
|
||||||
|
|
||||||
|
typedef struct _tabstops {
|
||||||
|
struct _tabstops *next;
|
||||||
|
int value;
|
||||||
|
} WMTabStops;
|
||||||
|
|
||||||
|
typedef struct W_RulerMargins {
|
||||||
|
int left; /* left margin marker */
|
||||||
|
int right; /* right margin marker */
|
||||||
|
int first; /* indentation marker for first line only */
|
||||||
|
int body; /* body indentation marker */
|
||||||
|
WMTabStops *tabs;
|
||||||
|
} WMRulerMargins;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
WMRuler *WMCreateRuler (WMWidget *parent);
|
||||||
|
void WMShowRulerTabs(WMRuler *rPtr, Bool Show);
|
||||||
|
void WMSetRulerMoveAction(WMRuler *rPtr,
|
||||||
|
WMAction *action, void *clientData);
|
||||||
|
void WMSetRulerReleaseAction(WMRuler *rPtr,
|
||||||
|
WMAction *action, void *clientData);
|
||||||
|
|
||||||
|
int WMGetRulerOffset(WMRuler *rPtr);
|
||||||
|
void WMSetRulerOffset(WMRuler *rPtr, int pixels);
|
||||||
|
|
||||||
|
WMRulerMargins WMGetRulerMargins(WMRuler *rPtr);
|
||||||
|
void WMSetRulerMargins(WMRuler *rPtr, WMRulerMargins margins);
|
||||||
|
|
||||||
|
int WMGetReleasedRulerMargin(WMRuler *rPtr);
|
||||||
|
int WMGetGrabbedRulerMargin(WMRuler *rPtr);
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user