mirror of
https://github.com/alexkay/spek.git
synced 2025-04-19 01:47:37 +03:00
42 lines
720 B
C++
42 lines
720 B
C++
#pragma once
|
|
|
|
#include <wx/dc.h>
|
|
#include <wx/string.h>
|
|
|
|
class SpekRuler
|
|
{
|
|
public:
|
|
enum Position
|
|
{
|
|
TOP,
|
|
RIGHT,
|
|
BOTTOM,
|
|
LEFT
|
|
};
|
|
|
|
typedef wxString (*formatter_cb)(int unit);
|
|
|
|
SpekRuler(
|
|
int x, int y, Position pos, wxString sample_label,
|
|
int *factors, int min_units, int max_units, double spacing,
|
|
double scale, double offset, formatter_cb formatter
|
|
);
|
|
|
|
void draw(wxDC& dc);
|
|
|
|
protected:
|
|
void draw_tick(wxDC& dc, int tick);
|
|
|
|
int x;
|
|
int y;
|
|
Position pos;
|
|
wxString sample_label;
|
|
int *factors;
|
|
int min_units;
|
|
int max_units;
|
|
double spacing;
|
|
double scale;
|
|
double offset;
|
|
formatter_cb formatter;
|
|
};
|