mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
Small fix.
This commit is contained in:
@@ -20,6 +20,23 @@
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
typedef enum {
|
||||
ctText=0,
|
||||
ctImage=1
|
||||
} ChunkType;
|
||||
|
||||
typedef enum {
|
||||
dtDelete=0,
|
||||
dtBackSpace
|
||||
} DeleteType;
|
||||
|
||||
typedef enum {
|
||||
wrWord=0,
|
||||
wrChar=1,
|
||||
wrNone=2
|
||||
} Wrapping;
|
||||
|
||||
|
||||
void wgdbFree(void *ptr)
|
||||
{
|
||||
if(!ptr) printf("err... cannot ");
|
||||
@@ -28,11 +45,7 @@ void wgdbFree(void *ptr)
|
||||
}
|
||||
|
||||
|
||||
typedef enum {ctText=0, ctImage=1} ChunkType;
|
||||
typedef enum { dtDelete=0, dtBackSpace } DeleteType;
|
||||
typedef enum {wrWord=0, wrChar=1, wrNone=2} Wrapping;
|
||||
|
||||
/* Why singly-linked and not say doubly-linked?
|
||||
/* Why single-linked and not say double-linked?
|
||||
99% of the time (draw, append), the "prior"
|
||||
member would have been a useless memory and CPU overhead,
|
||||
and deletes _are_ relatively infrequent.
|
||||
@@ -40,10 +53,11 @@ typedef enum {wrWord=0, wrChar=1, wrNone=2} Wrapping;
|
||||
doing things the hard way will be incurred... but seldomly. */
|
||||
|
||||
|
||||
/* a Chunk is a singly-linked list of chunks containing:
|
||||
o text with a given format
|
||||
o or an image
|
||||
o but NOT both */
|
||||
/* a Chunk is a single-linked list of chunks containing:
|
||||
* o text with a given format
|
||||
* o or an image
|
||||
* o but NOT both
|
||||
*/
|
||||
typedef struct _Chunk {
|
||||
char *text; /* the text in the chunk */
|
||||
WMPixmap *pixmap; /* OR the pixmap it holds */
|
||||
@@ -67,9 +81,10 @@ typedef struct _Chunk {
|
||||
|
||||
|
||||
/* a Paragraph is a singly-linked list of paragraphs containing:
|
||||
o a list of chunks in that paragraph
|
||||
o the formats for that paragraph
|
||||
o its (draw) position relative to the entire document */
|
||||
* o a list of chunks in that paragraph
|
||||
* o the formats for that paragraph
|
||||
* o its (draw) position relative to the entire document
|
||||
*/
|
||||
typedef struct _Paragraph {
|
||||
Chunk *chunks; /* the list of text and/or image chunks */
|
||||
short fmargin; /* the start position of the first line */
|
||||
@@ -101,7 +116,8 @@ static char *default_bullet[] = {
|
||||
".XX..o",
|
||||
".....o",
|
||||
" ...oo",
|
||||
" ooo "};
|
||||
" ooo "
|
||||
};
|
||||
|
||||
/* this is really a shrunk down version of the original
|
||||
"broken" icon... I did not draw it, I simply shrunk it */
|
||||
@@ -134,7 +150,8 @@ static char *default_bullet[] = {
|
||||
"............**@)!)>->...",
|
||||
"........................",
|
||||
"........................",
|
||||
"........................"};
|
||||
"........................"
|
||||
};
|
||||
|
||||
typedef struct W_Text {
|
||||
W_Class widgetClass; /* the class number of this widget */
|
||||
@@ -175,7 +192,7 @@ typedef struct W_Text {
|
||||
short clheight; /* the height of the "line" clicked on */
|
||||
short clwidth; /* the width of the "line" clicked on */
|
||||
|
||||
WMReliefType relief:2; /* the relief to display with */
|
||||
WMReliefType relief:3; /* the relief to display with */
|
||||
Wrapping wrapping:2; /* the type of wrapping to use in drawing */
|
||||
WMAlignment dAlignment:2; /* default justification */
|
||||
ushort monoFont:1; /* whether to ignore "rich" commands */
|
||||
@@ -207,6 +224,7 @@ typedef struct W_Text {
|
||||
/* max on a line */
|
||||
#define MAX_CHUNX 64
|
||||
#define MIN_DOC_WIDTH 200
|
||||
|
||||
typedef struct _LocalMargins {
|
||||
short left, right, first, body;
|
||||
} LocalMargins;
|
||||
|
||||
Reference in New Issue
Block a user