projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix colorpicker segvs in sketcher/titler plugins
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
plugins
/
sketcher
/
sketcherwindow.h
diff --git
a/cinelerra-5.1/plugins/sketcher/sketcherwindow.h
b/cinelerra-5.1/plugins/sketcher/sketcherwindow.h
index a0cc4ae21044ad6349e80e30f6a5d5031c38b436..71c8ac45018b8f1dbf50e9d1ec3d98aefa0cb6ec 100644
(file)
--- a/
cinelerra-5.1/plugins/sketcher/sketcherwindow.h
+++ b/
cinelerra-5.1/plugins/sketcher/sketcherwindow.h
@@
-21,10
+21,12
@@
#ifndef __CRIKEYWINDOW_H__
#define __CRIKEYWINDOW_H__
#ifndef __CRIKEYWINDOW_H__
#define __CRIKEYWINDOW_H__
+#include "sketcher.h"
#include "guicast.h"
#include "colorpicker.h"
class Sketcher;
#include "guicast.h"
#include "colorpicker.h"
class Sketcher;
+class SketcherCoord;
class SketcherNum;
class SketcherCurveTypeItem;
class SketcherCurveType;
class SketcherNum;
class SketcherCurveTypeItem;
class SketcherCurveType;
@@
-37,11
+39,14
@@
class SketcherNewCurve;
class SketcherDelCurve;
class SketcherCurveUp;
class SketcherCurveDn;
class SketcherDelCurve;
class SketcherCurveUp;
class SketcherCurveDn;
-class SketcherCurve
Radius
;
+class SketcherCurve
Width
;
class SketcherCurveList;
class SketcherPointX;
class SketcherPointY;
class SketcherCurveList;
class SketcherPointX;
class SketcherPointY;
+class SketcherPointId;
class SketcherDrag;
class SketcherDrag;
+class SketcherPointTypeItem;
+class SketcherPointType;
class SketcherPointList;
class SketcherNewPoint;
class SketcherDelPoint;
class SketcherPointList;
class SketcherNewPoint;
class SketcherDelPoint;
@@
-51,33
+56,27
@@
class SketcherResetCurves;
class SketcherResetPoints;
class SketcherWindow;
class SketcherResetPoints;
class SketcherWindow;
-class SketcherNum : public BC_TumbleTextBox
+
+class SketcherCoord : public BC_TumbleTextBox
{
public:
SketcherWindow *gui;
{
public:
SketcherWindow *gui;
- Sketcher
Num(SketcherWindow *gui, int x, int y, int
output,
-
int mn=-32767, int
mx=32767);
- ~Sketcher
Num
();
- int update(
int v) { return BC_TumbleTextBox::update((int64_t
)v); }
+ Sketcher
Coord(SketcherWindow *gui, int x, int y, coord
output,
+
coord mn=-32767, coord
mx=32767);
+ ~Sketcher
Coord
();
+ int update(
coord v) { return BC_TumbleTextBox::update((coord
)v); }
};
};
-class SketcherCurveTypeItem : public BC_MenuItem
-{
-public:
- SketcherCurveTypeItem(int ty);
- int handle_event();
- int ty;
-};
-
-class SketcherCurveType : public BC_PopupMenu
+class SketcherNum : public BC_TumbleTextBox
{
public:
{
public:
- SketcherCurveType(SketcherWindow *gui, int x, int y, int ty);
- void create_objects();
- void update(int ty);
-
SketcherWindow *gui;
SketcherWindow *gui;
+
+ SketcherNum(SketcherWindow *gui, int x, int y, int output,
+ int mn=-32767, int mx=32767);
+ ~SketcherNum();
+ int update(int v) { return BC_TumbleTextBox::update((int64_t)v); }
};
class SketcherCurvePenItem : public BC_MenuItem
};
class SketcherCurvePenItem : public BC_MenuItem
@@
-93,15
+92,16
@@
class SketcherCurvePen : public BC_PopupMenu
public:
SketcherCurvePen(SketcherWindow *gui, int x, int y, int pen);
void create_objects();
public:
SketcherCurvePen(SketcherWindow *gui, int x, int y, int pen);
void create_objects();
- void update(int
ty
);
+ void update(int
pen
);
SketcherWindow *gui;
SketcherWindow *gui;
+ int pen;
};
class SketcherCurveColor : public BC_Button
{
public:
};
class SketcherCurveColor : public BC_Button
{
public:
- SketcherCurveColor(SketcherWindow *gui, int x, int y, int w);
+ SketcherCurveColor(SketcherWindow *gui, int x, int y, int w
, int h
);
~SketcherCurveColor();
void set_color(int color);
~SketcherCurveColor();
void set_color(int color);
@@
-190,14
+190,15
@@
public:
SketcherWindow *gui;
};
SketcherWindow *gui;
};
-class SketcherCurve
Radius
: public SketcherNum
+class SketcherCurve
Width
: public SketcherNum
{
public:
{
public:
- SketcherCurveRadius(SketcherWindow *gui, int x, int y, float output)
- : SketcherNum(gui, x, y, output, 0, 255) {}
- ~SketcherCurveRadius() {}
+ SketcherCurveWidth(SketcherWindow *gui, int x, int y, int width);
+ ~SketcherCurveWidth();
int handle_event();
int handle_event();
+ void update(int width);
+ int width;
};
class SketcherCurveList : public BC_ListBox
};
class SketcherCurveList : public BC_ListBox
@@
-211,8
+212,8
@@
public:
int column_resize_event();
ArrayList<BC_ListBoxItem*> cols[CV_SZ];
void clear();
int column_resize_event();
ArrayList<BC_ListBoxItem*> cols[CV_SZ];
void clear();
- void add_curve(const char *id, const char *
type
,
- const char *
radius, const char *pen, const char *color
);
+ void add_curve(const char *id, const char *
pen
,
+ const char *
width, const char *color, const char *alpha
);
void del_curve(int i);
void set_selected(int k);
void update(int k);
void del_curve(int i);
void set_selected(int k);
void update(int k);
@@
-220,30
+221,40
@@
public:
SketcherWindow *gui;
Sketcher *plugin;
SketcherWindow *gui;
Sketcher *plugin;
- const char *titles[CV_SZ];
- int widths[CV_SZ];
+ const char *
col_
titles[CV_SZ];
+ int
col_
widths[CV_SZ];
};
};
-class SketcherPointX : public Sketcher
Num
+class SketcherPointX : public Sketcher
Coord
{
public:
SketcherPointX(SketcherWindow *gui, int x, int y, float output)
{
public:
SketcherPointX(SketcherWindow *gui, int x, int y, float output)
- : Sketcher
Num
(gui, x, y, output) {}
+ : Sketcher
Coord
(gui, x, y, output) {}
~SketcherPointX() {}
int handle_event();
};
~SketcherPointX() {}
int handle_event();
};
-class SketcherPointY : public Sketcher
Num
+class SketcherPointY : public Sketcher
Coord
{
public:
SketcherPointY(SketcherWindow *gui, int x, int y, float output)
{
public:
SketcherPointY(SketcherWindow *gui, int x, int y, float output)
- : Sketcher
Num
(gui, x, y, output) {}
+ : Sketcher
Coord
(gui, x, y, output) {}
~SketcherPointY() {}
int handle_event();
};
~SketcherPointY() {}
int handle_event();
};
+class SketcherPointId : public SketcherNum
+{
+public:
+ SketcherPointId(SketcherWindow *gui, int x, int y, int output)
+ : SketcherNum(gui, x, y, output) {}
+ ~SketcherPointId() {}
+
+ int handle_event();
+};
+
class SketcherDrag : public BC_CheckBox
{
class SketcherDrag : public BC_CheckBox
{
@@
-254,6
+265,25
@@
public:
SketcherWindow *gui;
};
SketcherWindow *gui;
};
+class SketcherPointTypeItem : public BC_MenuItem
+{
+public:
+ SketcherPointTypeItem(int arc);
+ int handle_event();
+ int arc;
+};
+
+class SketcherPointType : public BC_PopupMenu
+{
+public:
+ SketcherPointType(SketcherWindow *gui, int x, int y, int arc);
+ void create_objects();
+ void update(int arc);
+
+ SketcherWindow *gui;
+ int type;
+};
+
class SketcherPointList : public BC_ListBox
{
class SketcherPointList : public BC_ListBox
{
@@
-266,8
+296,9
@@
public:
int column_resize_event();
ArrayList<BC_ListBoxItem*> cols[PT_SZ];
void clear();
int column_resize_event();
ArrayList<BC_ListBoxItem*> cols[PT_SZ];
void clear();
- void add_point(const char *id, const char *xp, const char *yp);
+ void add_point(const char *id, const char *
ty, const char *
xp, const char *yp);
void set_point(int i, int c, int v);
void set_point(int i, int c, int v);
+ void set_point(int i, int c, coord v);
void set_point(int i, int c, const char *cp);
void set_selected(int k);
void update(int k);
void set_point(int i, int c, const char *cp);
void set_selected(int k);
void update(int k);
@@
-276,8
+307,8
@@
public:
SketcherWindow *gui;
Sketcher *plugin;
SketcherWindow *gui;
Sketcher *plugin;
- const char *titles[PT_SZ];
- int widths[PT_SZ];
+ const char *
col_
titles[PT_SZ];
+ int
col_
widths[PT_SZ];
};
class SketcherNewPoint : public BC_GenericButton
};
class SketcherNewPoint : public BC_GenericButton
@@
-358,18
+389,19
@@
public:
~SketcherWindow();
void create_objects();
~SketcherWindow();
void create_objects();
+ void done_event(int result);
void update_gui();
void start_color_thread(SketcherCurveColor *curve_color);
int grab_event(XEvent *event);
int do_grab_event(XEvent *event);
void update_gui();
void start_color_thread(SketcherCurveColor *curve_color);
int grab_event(XEvent *event);
int do_grab_event(XEvent *event);
- void done_event(int result);
+ int grab_button_press(XEvent *event);
+ int grab_cursor_motion();
void send_configure_change();
int keypress_event();
Sketcher *plugin;
void send_configure_change();
int keypress_event();
Sketcher *plugin;
- BC_Title *title_type, *title_pen;
- BC_Title *title_color, *title_radius;
+ BC_Title *title_pen, *title_color, *title_width;
SketcherCurveType *curve_type;
SketcherCurvePen *curve_pen;
SketcherCurveColor *curve_color;
SketcherCurveType *curve_type;
SketcherCurvePen *curve_pen;
SketcherCurveColor *curve_color;
@@
-378,24
+410,33
@@
public:
SketcherDelCurve *del_curve;
SketcherCurveUp *curve_up;
SketcherCurveDn *curve_dn;
SketcherDelCurve *del_curve;
SketcherCurveUp *curve_up;
SketcherCurveDn *curve_dn;
- SketcherCurve
Radius *curve_radius
;
+ SketcherCurve
Width *curve_width
;
SketcherCurveList *curve_list;
SketcherResetCurves *reset_curves;
SketcherCurveList *curve_list;
SketcherResetCurves *reset_curves;
- BC_Title *title_x, *title_y;
+ SketcherResetPoints *reset_points;
+ SketcherDrag *drag;
+ SketcherPointType *point_type;
+ SketcherPointList *point_list;
+ BC_Title *title_x, *title_y, *title_id;
SketcherPointX *point_x;
SketcherPointY *point_y;
SketcherPointX *point_x;
SketcherPointY *point_y;
+ SketcherPointId *point_id;
SketcherNewPoint *new_point;
SketcherDelPoint *del_point;
SketcherPointUp *point_up;
SketcherPointDn *point_dn;
SketcherNewPoint *new_point;
SketcherDelPoint *del_point;
SketcherPointUp *point_up;
SketcherPointDn *point_dn;
- int dragging, pending_config;
+ int64_t position;
+ float projector_x, projector_y, projector_z;
+ int track_w, track_h;
int new_points;
int new_points;
+ float cursor_x, cursor_y;
+ float output_x, output_y;
+ int state, dragging;
+ int pending_motion, pending_config;
+ XEvent motion_event;
float last_x, last_y;
float last_x, last_y;
- SketcherDrag *drag;
- SketcherPointList *point_list;
- SketcherResetPoints *reset_points;
- BC_Title *notes0, *notes1, *notes2;
+ BC_Title *notes0, *notes1, *notes2, *notes3;
};
#endif
};
#endif