]> git.saurik.com Git - wxWidgets.git/blob - include/wx/ribbon/art_internal.h
Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / ribbon / art_internal.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/ribbon/art_internal.h
3 // Purpose: Helper functions & classes used by ribbon art providers
4 // Author: Peter Cawley
5 // Modified by:
6 // Created: 2009-08-04
7 // Copyright: (C) Peter Cawley
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_RIBBON_ART_INTERNAL_H_
12 #define _WX_RIBBON_ART_INTERNAL_H_
13
14 #include "wx/defs.h"
15
16 #if wxUSE_RIBBON
17
18 WXDLLIMPEXP_RIBBON wxColour wxRibbonInterpolateColour(
19 const wxColour& start_colour,
20 const wxColour& end_colour,
21 int position,
22 int start_position,
23 int end_position);
24
25 WXDLLIMPEXP_RIBBON bool wxRibbonCanLabelBreakAtPosition(
26 const wxString& label,
27 size_t pos);
28
29 WXDLLIMPEXP_RIBBON void wxRibbonDrawParallelGradientLines(
30 wxDC& dc,
31 int nlines,
32 const wxPoint* line_origins,
33 int stepx,
34 int stepy,
35 int numsteps,
36 int offset_x,
37 int offset_y,
38 const wxColour& start_colour,
39 const wxColour& end_colour);
40
41 WXDLLIMPEXP_RIBBON wxBitmap wxRibbonLoadPixmap(
42 const char* const* bits,
43 wxColour fore);
44
45 /*
46 HSL colour class, using interface as discussed in wx-dev. Provided mainly
47 for art providers to perform colour scheme calculations in the HSL colour
48 space. If such a class makes it into base / core, then this class should be
49 removed and users switched over to the one in base / core.
50
51 0.0 <= Hue < 360.0
52 0.0 <= Saturation <= 1.0
53 0.0 <= Luminance <= 1.0
54 */
55 class WXDLLIMPEXP_RIBBON wxRibbonHSLColour
56 {
57 public:
58 wxRibbonHSLColour()
59 : hue(0.0), saturation(0.0), luminance(0.0) {}
60 wxRibbonHSLColour(float H, float S, float L)
61 : hue(H), saturation(S), luminance(L) { }
62 wxRibbonHSLColour(const wxColour& C);
63
64 wxColour ToRGB() const;
65
66 wxRibbonHSLColour& MakeDarker(float delta);
67 wxRibbonHSLColour Darker(float delta) const;
68 wxRibbonHSLColour Lighter(float delta) const;
69 wxRibbonHSLColour Saturated(float delta) const;
70 wxRibbonHSLColour Desaturated(float delta) const;
71 wxRibbonHSLColour ShiftHue(float delta) const;
72
73 float hue, saturation, luminance;
74 };
75
76 WXDLLIMPEXP_RIBBON wxRibbonHSLColour wxRibbonShiftLuminance(
77 wxRibbonHSLColour colour, float amount);
78
79 #endif // wxUSE_RIBBON
80
81 #endif // _WX_RIBBON_ART_INTERNAL_H_