mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-02 06:05:45 +01:00
*** empty log message ***
This commit is contained in:
@@ -695,8 +695,12 @@ WMFont * WMConvertFontToPlain(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont * WMConvertFontToBold(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont * WMConvertFontToUnbold(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont * WMConvertFontToItalic(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont * WMConvertFontToUnitalic(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont * WMGetFontOfSize(WMScreen *scr, WMFont *font, int size);
|
||||
|
||||
/* ....................................................................... */
|
||||
@@ -1503,6 +1507,8 @@ void WMSetTextUsesMonoFont(WMText *tPtr, Bool mono);
|
||||
|
||||
int WMGetTextUsesMonoFont(WMText *tPtr);
|
||||
|
||||
void WMSetTextIndentNewLines(WMText *tPtr, Bool indent);
|
||||
|
||||
void WMSetTextIgnoresNewline(WMText *tPtr, Bool ignore);
|
||||
|
||||
int WMGetTextIgnoresNewline(WMText *tPtr);
|
||||
@@ -1511,6 +1517,10 @@ void WMSetTextDefaultFont(WMText *tPtr, WMFont *font);
|
||||
|
||||
WMFont * WMGetTextDefaultFont(WMText *tPtr);
|
||||
|
||||
void WMSetTextDefaultColor(WMText *tPtr, WMColor *color);
|
||||
|
||||
WMColor * WMGetTextDefaultColor(WMText *tPtr);
|
||||
|
||||
void WMSetTextRelief(WMText *tPtr, WMReliefType relief);
|
||||
|
||||
void WMSetTextForegroundColor(WMText *tPtr, WMColor *color);
|
||||
|
||||
@@ -506,6 +506,27 @@ WMConvertFontToBold(WMScreen *scr, WMFont *font)
|
||||
return newfont;
|
||||
}
|
||||
|
||||
|
||||
WMFont *
|
||||
WMConvertFontToUnbold(WMScreen *scr, WMFont *font)
|
||||
{
|
||||
WMFont *newfont=NULL;
|
||||
char fname[256];
|
||||
|
||||
if(!scr || !font)
|
||||
return NULL;
|
||||
|
||||
snprintf(fname, 255, font->name);
|
||||
changeFontProp(fname, "medium", 2);
|
||||
newfont = WMCreateNormalFont(scr, fname);
|
||||
|
||||
if(!newfont)
|
||||
return NULL;
|
||||
|
||||
return newfont;
|
||||
}
|
||||
|
||||
|
||||
WMFont *
|
||||
WMConvertFontToItalic(WMScreen *scr, WMFont *font)
|
||||
{
|
||||
@@ -525,6 +546,25 @@ WMConvertFontToItalic(WMScreen *scr, WMFont *font)
|
||||
return newfont;
|
||||
}
|
||||
|
||||
WMFont *
|
||||
WMConvertFontToUnitalic(WMScreen *scr, WMFont *font)
|
||||
{
|
||||
WMFont *newfont=NULL;
|
||||
char fname[256];
|
||||
|
||||
if(!scr || !font)
|
||||
return NULL;
|
||||
|
||||
snprintf(fname, 255, font->name);
|
||||
changeFontProp(fname, "r", 3);
|
||||
newfont = WMCreateNormalFont(scr, fname);
|
||||
|
||||
if(!newfont)
|
||||
return NULL;
|
||||
|
||||
return newfont;
|
||||
}
|
||||
|
||||
WMFont *
|
||||
WMGetFontOfSize(WMScreen *scr, WMFont *font, int size)
|
||||
{
|
||||
|
||||
@@ -1855,7 +1855,6 @@ clearText(Text *tPtr)
|
||||
tPtr->currentTextBlock = NULL;
|
||||
tPtr->lastTextBlock = NULL;
|
||||
WMEmptyArray(tPtr->gfxItems);
|
||||
updateScrollers(tPtr);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1974,8 +1973,8 @@ insertTextInteractively(Text *tPtr, char *text, int len)
|
||||
|
||||
tb = tPtr->currentTextBlock;
|
||||
if (!tb || tb->graphic) {
|
||||
tPtr->tpos = 0;
|
||||
WMAppendTextStream(tPtr, text);
|
||||
tPtr->tpos = tPtr->currentTextBlock->used;
|
||||
layOutDocument(tPtr);
|
||||
return;
|
||||
}
|
||||
@@ -2992,8 +2991,10 @@ WMPrependTextStream(WMText *tPtr, char *text)
|
||||
if(!text) {
|
||||
if(tPtr->flags.ownsSelection)
|
||||
releaseSelection(tPtr);
|
||||
else
|
||||
else {
|
||||
clearText(tPtr);
|
||||
updateScrollers(tPtr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3004,6 +3005,7 @@ WMPrependTextStream(WMText *tPtr, char *text)
|
||||
insertPlainText(tPtr, text);
|
||||
|
||||
tPtr->flags.needsLayOut = True;
|
||||
tPtr->tpos = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3015,8 +3017,10 @@ WMAppendTextStream(WMText *tPtr, char *text)
|
||||
if(!text) {
|
||||
if(tPtr->flags.ownsSelection)
|
||||
releaseSelection(tPtr);
|
||||
else
|
||||
else {
|
||||
clearText(tPtr);
|
||||
updateScrollers(tPtr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3027,6 +3031,9 @@ WMAppendTextStream(WMText *tPtr, char *text)
|
||||
insertPlainText(tPtr, text);
|
||||
|
||||
tPtr->flags.needsLayOut = True;
|
||||
if(tPtr->currentTextBlock)
|
||||
tPtr->tpos = tPtr->currentTextBlock->used;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3662,7 +3669,29 @@ WMGetTextDefaultFont(WMText *tPtr)
|
||||
if (!tPtr)
|
||||
return NULL;
|
||||
else
|
||||
return tPtr->dFont;
|
||||
return WMRetainFont(tPtr->dFont);
|
||||
}
|
||||
|
||||
void
|
||||
WMSetTextDefaultColor(WMText *tPtr, WMColor *color)
|
||||
{
|
||||
if (!tPtr)
|
||||
return;
|
||||
|
||||
WMReleaseColor(tPtr->dColor);
|
||||
if (color)
|
||||
tPtr->dColor = WMRetainColor(color);
|
||||
else
|
||||
tPtr->dColor = WMBlackColor(tPtr->view->screen);
|
||||
}
|
||||
|
||||
WMColor *
|
||||
WMGetTextDefaultColor(WMText *tPtr)
|
||||
{
|
||||
if (!tPtr)
|
||||
return NULL;
|
||||
else
|
||||
return WMRetainColor(tPtr->dColor);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user