diff --git a/src/a-list/a-list-1.1.9/ALSelectors.c b/src/a-list/a-list-1.1.9/ALSelectors.c index e51e6effd3..07a146249a 100644 --- a/src/a-list/a-list-1.1.9/ALSelectors.c +++ b/src/a-list/a-list-1.1.9/ALSelectors.c @@ -204,6 +204,11 @@ ALIST_API void ALActivate(Boolean isActive, ALHandle hAL) } } // ALActivate +ALIST_API int ALIsActive(ALHandle hAL) +{ + return BTST((*hAL)->flags, alFActive) ? 1 : 0; +} + ALIST_API ControlPartCode ALSetFocus(ControlPartCode focusPart, ALHandle hAL) { ControlPartCode result; Boolean oldFocus; diff --git a/src/a-list/c-headers/TheAList.h b/src/a-list/c-headers/TheAList.h index 534ca7f948..d1363e74df 100644 --- a/src/a-list/c-headers/TheAList.h +++ b/src/a-list/c-headers/TheAList.h @@ -635,7 +635,8 @@ ALIST_API void ALSetSelectAll(Boolean redrawIfChange, ALReference hAL); ALIST_API OSErr ALGetInfo(ALSelector selector, void *info, ALReference hAL); ALIST_API OSErr ALSetInfo(ALSelector selector, const void *info, ALReference hAL); ALIST_API short ALFeatureFlag(unsigned long feature, short action, ALReference hAL); -ALIST_API void ALActivate(Boolean isActive, ALReference hAL); +ALIST_API void ALActivate(Boolean isActive, ALReference hAL); +ALIST_API int ALIsActive(ALReference hAL); ALIST_API ControlPartCode ALSetFocus(ControlPartCode focusPart, ALReference hAL); ALIST_API ControlPartCode ALPartFocused(ALReference hAL); diff --git a/src/wxmac/include/mac/wx_canvs.h b/src/wxmac/include/mac/wx_canvs.h index 4fbea748a6..aa24769fe1 100644 --- a/src/wxmac/include/mac/wx_canvs.h +++ b/src/wxmac/include/mac/wx_canvs.h @@ -179,6 +179,9 @@ class wxCanvas: public wxbCanvas wxColor *GetCanvasBackground(); Bool SetAsControl(); + + protected: + void ChangeToGray(Bool Gray); }; #endif // IN_CPROTO diff --git a/src/wxmac/include/mac/wx_rbut.h b/src/wxmac/include/mac/wx_rbut.h index 6d270edad1..e6660f76ec 100644 --- a/src/wxmac/include/mac/wx_rbut.h +++ b/src/wxmac/include/mac/wx_rbut.h @@ -105,6 +105,9 @@ class wxRadioButton: public wxItem virtual void OnSetFocus(); virtual void OnKillFocus(); + + protected: + void ChangeToGray(Bool Gray); }; #endif // IN_CPROTO diff --git a/src/wxmac/src/mac/wx_canvs.cc b/src/wxmac/src/mac/wx_canvs.cc index 87c5043953..3ad830e3c3 100644 --- a/src/wxmac/src/mac/wx_canvs.cc +++ b/src/wxmac/src/mac/wx_canvs.cc @@ -710,6 +710,13 @@ void wxCanvas::ShowAsActive(Bool flag) /* Do nothing. */ } +void wxCanvas::ChangeToGray(Bool gray) +{ + if (cStyle & wxAS_CONTROL) + Refresh(); + wxbCanvas::ChangeToGray(gray); +} + //----------------------------------------------------------------------------- void wxCanvas::ClientToLogical(int* x, int* y) // mac platform only; testing { // Transform point from client c.s. to logical c.s. (virtual canvas, scrolling) diff --git a/src/wxmac/src/mac/wx_dialg.cc b/src/wxmac/src/mac/wx_dialg.cc index f20091d8aa..b9ad341783 100644 --- a/src/wxmac/src/mac/wx_dialg.cc +++ b/src/wxmac/src/mac/wx_dialg.cc @@ -641,7 +641,6 @@ static char *GetNthPath(NavReplyRecord *reply, int index) return wxFSRefToPath(fsref); } -static CFStringRef clientName = CFSTR("MrEd"); static NavEventUPP extProc = NewNavEventUPP((NavEventProcPtr)ExtensionCallback); char *wxFileSelector(char *message, char *default_path, diff --git a/src/wxmac/src/mac/wx_lbox.cc b/src/wxmac/src/mac/wx_lbox.cc index b4ab3fa019..3fd7746320 100644 --- a/src/wxmac/src/mac/wx_lbox.cc +++ b/src/wxmac/src/mac/wx_lbox.cc @@ -80,7 +80,12 @@ static void MyDrawCell(ALData cellData, ALCellPtr cell, const Rect *cellRect, AL ::GetFontInfo(&fontInfo); MoveTo(cellRect->left, fontInfo.ascent + cellRect->top); - ForeColor(blackColor); + if (!ALIsActive(hAL)) { + RGBColor c; + c.red = c.green = c.blue = 0x7FFF; + RGBForeColor(&c); + } else + ForeColor(blackColor); CopyPascalStringToC(*(StringHandle)cellData, wxBuffer); TextMode(srcOr); wxDrawUnicodeText(wxBuffer, 0, -1, 0); diff --git a/src/wxmac/src/mac/wx_rbut.cc b/src/wxmac/src/mac/wx_rbut.cc index 7766acbd4f..919763cfeb 100644 --- a/src/wxmac/src/mac/wx_rbut.cc +++ b/src/wxmac/src/mac/wx_rbut.cc @@ -283,6 +283,13 @@ void wxRadioButton::Paint(void) } } +void wxRadioButton::ChangeToGray(Bool gray) +{ + if (cPaintControl) + Refresh(); + wxItem::ChangeToGray(gray); +} + void wxRadioButton::Highlight(Bool on) { if (on)