OS X: improve drawing of grayed-out lists, bitmap-labelled radio buttons, and non-bordered tab panels
svn: r5976
This commit is contained in:
parent
59451c941c
commit
1e9ceda1a2
|
@ -204,6 +204,11 @@ ALIST_API void ALActivate(Boolean isActive, ALHandle hAL)
|
||||||
}
|
}
|
||||||
} // ALActivate
|
} // ALActivate
|
||||||
|
|
||||||
|
ALIST_API int ALIsActive(ALHandle hAL)
|
||||||
|
{
|
||||||
|
return BTST((*hAL)->flags, alFActive) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
ALIST_API ControlPartCode ALSetFocus(ControlPartCode focusPart, ALHandle hAL)
|
ALIST_API ControlPartCode ALSetFocus(ControlPartCode focusPart, ALHandle hAL)
|
||||||
{ ControlPartCode result;
|
{ ControlPartCode result;
|
||||||
Boolean oldFocus;
|
Boolean oldFocus;
|
||||||
|
|
|
@ -636,6 +636,7 @@ ALIST_API OSErr ALGetInfo(ALSelector selector, void *info, ALReference hAL);
|
||||||
ALIST_API OSErr ALSetInfo(ALSelector selector, const 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 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 ALSetFocus(ControlPartCode focusPart, ALReference hAL);
|
||||||
ALIST_API ControlPartCode ALPartFocused(ALReference hAL);
|
ALIST_API ControlPartCode ALPartFocused(ALReference hAL);
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,9 @@ class wxCanvas: public wxbCanvas
|
||||||
wxColor *GetCanvasBackground();
|
wxColor *GetCanvasBackground();
|
||||||
|
|
||||||
Bool SetAsControl();
|
Bool SetAsControl();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void ChangeToGray(Bool Gray);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // IN_CPROTO
|
#endif // IN_CPROTO
|
||||||
|
|
|
@ -105,6 +105,9 @@ class wxRadioButton: public wxItem
|
||||||
|
|
||||||
virtual void OnSetFocus();
|
virtual void OnSetFocus();
|
||||||
virtual void OnKillFocus();
|
virtual void OnKillFocus();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void ChangeToGray(Bool Gray);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // IN_CPROTO
|
#endif // IN_CPROTO
|
||||||
|
|
|
@ -710,6 +710,13 @@ void wxCanvas::ShowAsActive(Bool flag)
|
||||||
/* Do nothing. */
|
/* 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
|
void wxCanvas::ClientToLogical(int* x, int* y) // mac platform only; testing
|
||||||
{ // Transform point from client c.s. to logical c.s. (virtual canvas, scrolling)
|
{ // Transform point from client c.s. to logical c.s. (virtual canvas, scrolling)
|
||||||
|
|
|
@ -641,7 +641,6 @@ static char *GetNthPath(NavReplyRecord *reply, int index)
|
||||||
return wxFSRefToPath(fsref);
|
return wxFSRefToPath(fsref);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CFStringRef clientName = CFSTR("MrEd");
|
|
||||||
static NavEventUPP extProc = NewNavEventUPP((NavEventProcPtr)ExtensionCallback);
|
static NavEventUPP extProc = NewNavEventUPP((NavEventProcPtr)ExtensionCallback);
|
||||||
|
|
||||||
char *wxFileSelector(char *message, char *default_path,
|
char *wxFileSelector(char *message, char *default_path,
|
||||||
|
|
|
@ -80,6 +80,11 @@ static void MyDrawCell(ALData cellData, ALCellPtr cell, const Rect *cellRect, AL
|
||||||
::GetFontInfo(&fontInfo);
|
::GetFontInfo(&fontInfo);
|
||||||
MoveTo(cellRect->left, fontInfo.ascent + cellRect->top);
|
MoveTo(cellRect->left, fontInfo.ascent + cellRect->top);
|
||||||
|
|
||||||
|
if (!ALIsActive(hAL)) {
|
||||||
|
RGBColor c;
|
||||||
|
c.red = c.green = c.blue = 0x7FFF;
|
||||||
|
RGBForeColor(&c);
|
||||||
|
} else
|
||||||
ForeColor(blackColor);
|
ForeColor(blackColor);
|
||||||
CopyPascalStringToC(*(StringHandle)cellData, wxBuffer);
|
CopyPascalStringToC(*(StringHandle)cellData, wxBuffer);
|
||||||
TextMode(srcOr);
|
TextMode(srcOr);
|
||||||
|
|
|
@ -283,6 +283,13 @@ void wxRadioButton::Paint(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxRadioButton::ChangeToGray(Bool gray)
|
||||||
|
{
|
||||||
|
if (cPaintControl)
|
||||||
|
Refresh();
|
||||||
|
wxItem::ChangeToGray(gray);
|
||||||
|
}
|
||||||
|
|
||||||
void wxRadioButton::Highlight(Bool on)
|
void wxRadioButton::Highlight(Bool on)
|
||||||
{
|
{
|
||||||
if (on)
|
if (on)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user