ultimatepp/uppsrc/CtrlLib/Ch.h
cxl 2d04800ec8 CtrlLib: ChGtk2 removed, X11 now using standard skin
git-svn-id: svn://ultimatepp.org/upp/trunk@13857 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-01-11 16:48:15 +00:00

40 lines
1.6 KiB
C

void ChBaseSkin();
void ChStdSkin();
void ChClassicSkin();
void ChHostSkin();
enum {
CORNER_TOP_LEFT = 0x01,
CORNER_TOP_RIGHT = 0x02,
CORNER_BOTTOM_LEFT = 0x04,
CORNER_BOTTOM_RIGHT = 0x08,
};
void RoundedRect(Painter& w, double x, double y, double cx, double cy, double rx, double ry, dword corners);
void RoundedRect(Painter& w, Rectf r, double rx, double ry, dword corner);
Image MakeElement(Size sz, double radius, const Image& face, double border_width, Color border_color, Event<Painter&, const Rectf&> shape);
Image MakeButton(int radius, const Image& face, double border_width, Color border_color = Null, dword corner = 0xff);
Image MakeButton(int radius, Color face, double border_width, Color border_color = Null, dword corner = 0xff);
Image Hot3(const Image& m); // Adds resizing hotspots at 1/3
Image ChHot(const Image& m, int n = 2); // Adds resizing hotspots DPI(n)
Color AvgColor(const Image& m, const Rect& rr);
Color AvgColor(const Image& m, int margin = 0);
Color GetInk(const Image& m); // the color that is most different from AvgColor
int GetRoundness(const Image& m);
Image WithRect(Image m, int x, int y, int cx, int cy, Color c);
Image WithLeftLine(const Image& m, Color c, int w = DPI(1));
Image WithRightLine(const Image& m, Color c, int w = DPI(1));
Image WithTopLine(const Image& m, Color c, int w = DPI(1));
Image WithBottomLine(const Image& m, Color c, int w = DPI(1));
// Creates synthetic style based on SColors and basic button face
void ChSynthetic(Image button100x100[4], Color text[4]);
// for diagnostics purposes
#ifdef _DEBUG
void SetChameleonSample(const Value& m, bool once = true);
Value GetChameleonSample();
#endif