mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-30 04:05:51 +01:00
Modified ruler stuff
This commit is contained in:
@@ -401,6 +401,23 @@ typedef struct WMInputPanel {
|
|||||||
} WMInputPanel;
|
} WMInputPanel;
|
||||||
|
|
||||||
|
|
||||||
|
/* WMRuler stuff */
|
||||||
|
/* 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 {
|
||||||
|
int value;
|
||||||
|
struct WMTabStops *next;
|
||||||
|
} WMTabStops;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1389,27 +1406,25 @@ int WMGetSplitViewDividerThickness(WMSplitView *sPtr);
|
|||||||
|
|
||||||
/* ...................................................................... */
|
/* ...................................................................... */
|
||||||
|
|
||||||
|
|
||||||
WMRuler *WMCreateRuler (WMWidget *parent);
|
WMRuler *WMCreateRuler (WMWidget *parent);
|
||||||
|
|
||||||
void WMShowRulerTabs(WMRuler *rPtr, Bool Show);
|
void WMShowRulerTabs(WMRuler *rPtr, Bool Show);
|
||||||
|
|
||||||
int WMGetRulerMargin(WMRuler *rPtr, int which);
|
WMRulerMargins WMGetRulerMargins(WMRuler *rPtr);
|
||||||
|
|
||||||
int WMGetReleasedRulerMargin(WMRuler *rPtr);
|
void WMSetRulerMargins(WMRuler *rPtr, WMRulerMargins margins);
|
||||||
|
|
||||||
int WMGetGrabbedRulerMargin(WMRuler *rPtr);
|
int WMGetGrabbedRulerMargin(WMRuler *rPtr);
|
||||||
|
|
||||||
|
int WMGetReleasedRulerMargin(WMRuler *rPtr);
|
||||||
|
|
||||||
int WMGetRulerOffset(WMRuler *rPtr);
|
int WMGetRulerOffset(WMRuler *rPtr);
|
||||||
|
|
||||||
void WMSetRulerOffset(WMRuler *rPtr, int pixels);
|
void WMSetRulerOffset(WMRuler *rPtr, int pixels);
|
||||||
|
|
||||||
void WMSetRulerMargin(WMRuler *rPtr, int which, int pixels);
|
|
||||||
|
|
||||||
void WMSetRulerAction(WMRuler *rPtr, WMAction *action, void *clientData);
|
|
||||||
|
|
||||||
void WMSetRulerMoveAction(WMRuler *rPtr, WMAction *action, void *clientData);
|
void WMSetRulerMoveAction(WMRuler *rPtr, WMAction *action, void *clientData);
|
||||||
|
|
||||||
|
void WMSetRulerReleaseAction(WMRuler *rPtr, WMAction *action, void *clientData);
|
||||||
|
|
||||||
/* ....................................................................... */
|
/* ....................................................................... */
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "wruler.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
#define MIN_DOC_WIDTH 10
|
#define MIN_DOC_WIDTH 10
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
|
|
||||||
#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