Gtk3 by Hombre, issue 2807

This commit is contained in:
Morgan Hardwood
2015-08-12 16:07:19 +02:00
parent 91f67f0cb6
commit 56a0805bc7
133 changed files with 3950 additions and 2626 deletions

View File

@@ -35,7 +35,7 @@
#define CBAR_MARGIN 2 /** spacing between the colored bar and the graph */
#define SQUARE 2 /** half length of the square shape of the tangent handles */
#define MIN_DISTANCE 5 /** min distance between control points */
#define GRAPH_SIZE 200 /** size of the curve editor graphic */
#define GRAPH_SIZE 150 /** size of the curve editor graphic */
/** @brief Flat or Diagonal curve type
For compatibility and simplicity reason, order shouldn't change, and must be identical to the order specified in the curveType widget
@@ -53,12 +53,6 @@ enum SnapToType {
ST_Neighbors /// Point snapped to the neighbor points
};
enum ResizeState {
RS_Pending = 1, /// Resize has to occurs
RS_Done = 2, /// Resize has been done
RS_Force = 4 /// Resize has to occurs even without CONFIGURE event
};
class MyCurveIdleHelper;
class CurveEditor;
@@ -98,7 +92,6 @@ protected:
double snapToMinDistX, snapToMinDistY;
double snapToValX, snapToValY;
MyCurveIdleHelper* mcih;
enum ResizeState sized;
bool curveIsDirty;
int edited_point; // > -1 when a point is being numerically edited
@@ -130,18 +123,15 @@ public:
{
return;
} ;
void forceResize()
{
sized = RS_Force;
}
void refresh();
void setCurveDirty ()
{
curveIsDirty = true;
}
void on_style_changed (const Glib::RefPtr<Gtk::Style>& style);
void on_style_updated ();
virtual std::vector<double> getPoints () = 0;
virtual void setPoints (const std::vector<double>& p) = 0;
virtual bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) = 0;
virtual bool handleEvents (GdkEvent* event) = 0;
virtual void reset (const std::vector<double> &resetCurve, double identityValue = 0.5) = 0;
@@ -154,6 +144,12 @@ public:
{
return options.slimUI ? CBAR_WIDTH_SLIM : CBAR_WIDTH_STD;
}
Gtk::SizeRequestMode get_request_mode_vfunc () const;
void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const;
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const;
void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const;
void get_preferred_width_for_height_vfunc (int width, int &minimum_width, int &natural_width) const;
};
class MyCurveIdleHelper