: wxPanel(parent,
id, pos,
size, style, name),
70m_Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
77 inttext_h =
abs(
m_Font.GetPixelSize().y);
89wxRect rc = GetClientRect();
94 intleft = rc.GetLeft();
95 inttop = rc.GetTop();
96 intwidth = rc.GetWidth();
98 intright = left + width - 1;
110norm_start =
max(0.0, norm_start);
111norm_end =
min(1.0, norm_end);
113dc.SetPen(*wxTRANSPARENT_PEN);
115 doubled = ((double) (norm_end - norm_start) * width) /
n;
116 intgrad_x = left + (
int)(norm_start * width);
117 for(
int i= 0;
i<
n;
i++) {
118 intx1 = (
int) floor(d *
i);
119 intx2 = (
int) ceil(d * (
i+ 1));
120 floatk = ((float)
i) / (
n- 1);
125dc.DrawRectangle(grad_x + x1, top, x2 - x1,
kGradH);
129wxColour cl_text = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT);
130dc.SetTextForeground(cl_text);
136 intclip_left = left;
137 intclip_right = right;
138wxAlignment align = (
m_Params->
m_MinValue> start) ? wxALIGN_CENTER : wxALIGN_LEFT;
142clip_left = clip_right +
kSpace;
146dc.SetPen(wxPen(cl_text));
149 doubled_value = value_range / 4;
150 for(
int i= 0;
i< 5;
i++ ) {
153 intline_x = left + (
int) (norm * (width - 1));
154dc.DrawLine(line_x, tick_y, line_x, tick_y +
kTickH);
162 int& clip_left,
int& clip_right,
inty, wxAlignment align)
165 intx = left + (
int)(norm * (right - left));
166 inttext_w = 0, text_h = 0;
169dc.GetTextExtent(
str, &text_w, &text_h);
183 if(x + text_w > right) {
190 if(x >= left && (x + text_w - 1) <= right) {
191dc.DrawText(
str, x, y);
194clip_right = x + text_w - 1;
196clip_left = clip_right = left;
void SetParams(const SHitColoringParams *params)
void OnPaint(wxPaintEvent &event)
void x_DrawNumber(wxDC &dc, double value, int left, int right, int &clip_left, int &clip_right, int y, wxAlignment align)
virtual wxSize DoGetBestSize() const
const SHitColoringParams * m_Params
class CRgbaColor provides a simple abstraction for managing colors.
static const char * str(char *buf, int n)
static CRgbaColor Interpolate(const CRgbaColor &color1, const CRgbaColor &color2, float alpha)
Interpolate two colors.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
double GetColorNorm(double value, bool precise=true) const
const char * GetPrecisionFormat() const
wxColour ConvertColor(const CRgbaColor &color)
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4