mirror of https://github.com/macssh/macssh.git
changed CHO
This commit is contained in:
parent
ec42c44f8b
commit
9a76876b3c
|
@ -32,6 +32,7 @@
|
|||
#include "SmartTrackControl.h"
|
||||
#include "sshglue.proto.h"
|
||||
#include "general_resrcdefs.h"
|
||||
#include "movableModal.h"
|
||||
|
||||
extern void syslog( int priority, const char *format, ...);
|
||||
|
||||
|
@ -338,9 +339,6 @@ short RSupdate
|
|||
|
||||
DrawGrowIcon(wind);
|
||||
|
||||
#if !GENERATINGPOWERPC
|
||||
UpdateControls(wind, wind->visRgn);
|
||||
#else
|
||||
if (RSlocal[w].active) {
|
||||
UpdateControls(wind, wind->visRgn);
|
||||
} else {
|
||||
|
@ -373,7 +371,7 @@ short RSupdate
|
|||
BackColor(blackColor);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
RSdrawlocker(w, wind->visRgn);
|
||||
}
|
||||
EndUpdate(wind);
|
||||
|
@ -565,12 +563,29 @@ Boolean RSsetcolor
|
|||
if ( !(TelInfo->haveColorQuickDraw) || (RSsetwind(w) < 0) || (n > 15) || (n < 0))
|
||||
return(FALSE);
|
||||
|
||||
#if GENERATINGPOWERPC
|
||||
if ( n == 1 && gHasSetWindowContentColor ) {
|
||||
SetWindowContentColor(RScurrent->window, &Color);
|
||||
}
|
||||
#endif
|
||||
SetEntryColor(RScurrent->pal, n, &Color);
|
||||
|
||||
if ( n == 1 ) {
|
||||
/* set background color */
|
||||
#if GENERATINGPOWERPC
|
||||
if (gHasSetWindowContentColor ) {
|
||||
SetWindowContentColor(RScurrent->window, &Color);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
WCTabHandle colorTable = (WCTabHandle)myNewHandle(sizeof(WinCTab));
|
||||
if (colorTable != NULL) {
|
||||
(**colorTable).wCSeed = 0;
|
||||
(**colorTable).wCReserved = 0;
|
||||
(**colorTable).ctSize = 0;
|
||||
(**colorTable).ctTable[0].value = wContentColor;
|
||||
(**colorTable).ctTable[0].rgb = Color;
|
||||
SetWinColor(RScurrent->window, colorTable);
|
||||
DisposeHandle((Handle)colorTable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetPort(RScurrent->window);
|
||||
InvalRect(&RScurrent->window->portRect);
|
||||
return(TRUE);
|
||||
|
@ -833,17 +848,15 @@ void RSkillwindow
|
|||
RSw = -1;
|
||||
}
|
||||
|
||||
RGBColor RSgetcolor
|
||||
void RSgetcolor
|
||||
(
|
||||
short w, /* window number */
|
||||
short n /* color entry number */
|
||||
short n, /* color entry number */
|
||||
RGBColor *color /* output color */
|
||||
)
|
||||
/* gets the current value for the specified color entry of a terminal window. */
|
||||
{
|
||||
RGBColor theColor;
|
||||
GetEntryColor(RSlocal[w].pal,n,&theColor);
|
||||
return theColor;
|
||||
|
||||
GetEntryColor(RSlocal[w].pal,n,color);
|
||||
} /* RSgetcolor */
|
||||
|
||||
void RShide( short w) /* hides a terminal window. */
|
||||
|
@ -1132,12 +1145,13 @@ void RScprompt(short w)
|
|||
Boolean UserLikesNewColor;
|
||||
RGBColor scratchRGBcolor;
|
||||
|
||||
SetUpMovableModalMenus();
|
||||
dptr = GetNewMySmallDialog(ColorDLOG, NULL, kInFront, (void *)ThirdCenterDialog);
|
||||
|
||||
for (scratchshort = 0, NumberOfColorBoxes = 4; scratchshort < NumberOfColorBoxes; scratchshort++)
|
||||
{
|
||||
RGBColor tempColor;
|
||||
tempColor = RSgetcolor(w,scratchshort);
|
||||
RSgetcolor(w,scratchshort, &tempColor);
|
||||
BoxColorItems[scratchshort] = ColorNF + scratchshort;
|
||||
BlockMoveData(&tempColor,&BoxColorData[scratchshort], sizeof(RGBColor));
|
||||
UItemAssign( dptr, ColorNF + scratchshort, ColorBoxItemProcUPP);
|
||||
|
@ -1148,7 +1162,9 @@ void RScprompt(short w)
|
|||
|
||||
ditem = 3;
|
||||
while (ditem > 2) {
|
||||
ModalDialog(ColorBoxModalProcUPP, &ditem);
|
||||
/*ModalDialog(ColorBoxModalProcUPP, &ditem);*/
|
||||
movableModalDialog(ColorBoxModalProcUPP, &ditem);
|
||||
|
||||
switch (ditem) {
|
||||
case ColorNF:
|
||||
case ColorNB:
|
||||
|
@ -1172,6 +1188,7 @@ void RScprompt(short w)
|
|||
|
||||
if (ditem == DLOGCancel) {
|
||||
DisposeDialog(dptr);
|
||||
ResetMenus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1183,6 +1200,7 @@ void RScprompt(short w)
|
|||
InvalRect(&RSlocal[w].window->portRect);
|
||||
|
||||
DisposeDialog(dptr);
|
||||
ResetMenus();
|
||||
} /* RScprompt */
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -17,7 +17,7 @@ short RSnewwindow(RectPtr wDims,short scrollback, short width, short lines, Stri
|
|||
short colorBold, short ignoreBeeps, short bfnum, short bfsiz, short bfstyle, short realbold, short oldScrollback, short jump, short);
|
||||
short RSmouseintext(short w, Point myPoint);
|
||||
void RSkillwindow(short w);
|
||||
RGBColor RSgetcolor(short w, short n);
|
||||
void RSgetcolor(short w, short n, RGBColor *color);
|
||||
void RShide(short w);
|
||||
GrafPtr RSgetwindow(short w);
|
||||
char **RSGetTextSel(short w, short table);
|
||||
|
|
|
@ -560,24 +560,36 @@ void RSdraw
|
|||
|
||||
RSsetattr(a);
|
||||
|
||||
if (x <= 0)
|
||||
rect.left = 0;
|
||||
if (rect.left <= 0) /* little buffer strip on left */
|
||||
rect.left = CHO;
|
||||
if (rect.right >= RScurrent->width - 1)
|
||||
rect.right = RScurrent->rwidth - 1;
|
||||
if (rect.bottom >= RScurrent->height - 1)
|
||||
rect.bottom = RScurrent->rheight + 1;
|
||||
|
||||
EraseRect(&rect);
|
||||
|
||||
if (rect.left <= 0)
|
||||
rect.left = 0;
|
||||
if (rect.right >= RScurrent->width)
|
||||
rect.right = RScurrent->width;
|
||||
if (rect.bottom >= RScurrent->height)
|
||||
rect.bottom = RScurrent->height;
|
||||
|
||||
MoveTo(x * RScurrent->fwidth, ys + RScurrent->fascent);
|
||||
|
||||
if ( rect.bottom < RScurrent->height || !VSisundl(a) ) {
|
||||
DrawText(ptr, 0, len);
|
||||
} else {
|
||||
rect.right += 1;
|
||||
++rect.right;
|
||||
TETextBox(ptr, len, &rect, teJustLeft);
|
||||
--rect.right;
|
||||
}
|
||||
|
||||
if (RScurrent->selected)
|
||||
if (RScurrent->selected) {
|
||||
RSinvText(w, *(Point *) &RScurrent->anchor,
|
||||
*(Point *) &RScurrent->last, &rect);
|
||||
|
||||
}
|
||||
ValidRect(&rect);
|
||||
|
||||
} /* RSdraw */
|
||||
|
@ -674,11 +686,10 @@ void RSdelchars
|
|||
RScurrent->width,
|
||||
(y + 1) * RScurrent->fheight
|
||||
);
|
||||
if ((x + n) * RScurrent->fwidth > RScurrent->width)
|
||||
/* deleting to end of line */
|
||||
if ((x + n) * RScurrent->fwidth > RScurrent->width) {
|
||||
/* deleting to end of line */
|
||||
EraseRect(&rect);
|
||||
else
|
||||
{
|
||||
} else {
|
||||
/* scroll remainder of line to the left */
|
||||
ScrollRectInRgn(RScurrent->window, &rect, - n * RScurrent->fwidth, 0);
|
||||
|
||||
|
@ -736,9 +747,9 @@ void RSdellines
|
|||
MYSETRECT
|
||||
(
|
||||
rect,
|
||||
-3, /* scroll 3 pixels more on the left */
|
||||
CHO, /* scroll 3 pixels more on the left */
|
||||
t * RScurrent->fheight,
|
||||
RScurrent->width,
|
||||
RScurrent->rwidth - 1,
|
||||
(b + 1) * RScurrent->fheight
|
||||
);
|
||||
|
||||
|
@ -777,8 +788,8 @@ void RSerase
|
|||
if (rect.left <= 0) /* little buffer strip on left */
|
||||
rect.left = CHO;
|
||||
if (rect.right >= RScurrent->width - 1)
|
||||
rect.right = RScurrent->rwidth - 2; /* clear to edge of window, including edge strip */
|
||||
if (rect.bottom >= RScurrent->height)
|
||||
rect.right = RScurrent->rwidth - 1; /* clear to edge of window, including edge strip */
|
||||
if (rect.bottom >= RScurrent->height - 1)
|
||||
rect.bottom = RScurrent->rheight + 1; /* clear to bottom edge also */
|
||||
EraseRect(&rect);
|
||||
if (RScurrent->selected)
|
||||
|
@ -807,6 +818,7 @@ void RSinslines
|
|||
RSsetwind(w);
|
||||
RSsetConst(w);
|
||||
RSsetattr(0); /* avoid funny pen modes */
|
||||
|
||||
if (RScurrent->selected && (scrolled < 0))
|
||||
{
|
||||
/* unhighlight and cancel selection */
|
||||
|
@ -816,9 +828,9 @@ void RSinslines
|
|||
MYSETRECT
|
||||
(
|
||||
rect,
|
||||
-3, /* scroll 3 pixels more on the left */
|
||||
CHO, /* scroll 3 pixels more on the left */
|
||||
t * RScurrent->fheight,
|
||||
RScurrent->width,
|
||||
RScurrent->rwidth - 1,
|
||||
(b + 1) * RScurrent->fheight
|
||||
);
|
||||
|
||||
|
@ -902,8 +914,9 @@ void RSinsstring
|
|||
if ( rect.bottom < RScurrent->height || !VSisundl(a) ) {
|
||||
DrawText(ptr, 0, len);
|
||||
} else {
|
||||
rect.right += 1;
|
||||
++rect.right;
|
||||
TETextBox(ptr, len, &rect, teJustLeft);
|
||||
--rect.right;
|
||||
}
|
||||
if (RScurrent->selected)
|
||||
/* highlight any part of selection covering the newly-inserted text */
|
||||
|
|
Loading…
Reference in New Issue