projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
not needed since build defaults to no commercial build
[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 35e7e898346ef6feb712722d4a7bea4c8aee20ca..a0a5e3ce374353327c041423ce0ae78128ba9387 100644
(file)
--- a/
cinelerra-5.1/plugins/sketcher/sketcherwindow.h
+++ b/
cinelerra-5.1/plugins/sketcher/sketcherwindow.h
@@
-15,32
+15,34
@@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
*/
-#ifndef __
CRIKEY
WINDOW_H__
-#define __
CRIKEY
WINDOW_H__
+#ifndef __
SKETCHER
WINDOW_H__
+#define __
SKETCHER
WINDOW_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 SketcherCurvePenItem;
class SketcherCurvePen;
class SketcherCurveColor;
class SketcherNum;
class SketcherCurveTypeItem;
class SketcherCurveType;
class SketcherCurvePenItem;
class SketcherCurvePen;
class SketcherCurveColor;
-class SketcherCurveColorPicker;
-class SketcherCurveColorThread;
class SketcherNewCurve;
class SketcherDelCurve;
class SketcherCurveUp;
class SketcherCurveDn;
class SketcherNewCurve;
class SketcherDelCurve;
class SketcherCurveUp;
class SketcherCurveDn;
-class SketcherCurveRadius;
+class SketcherCurveWidth;
+class SketcherAliasItem;
+class SketcherAliasing;
class SketcherCurveList;
class SketcherPointX;
class SketcherPointY;
class SketcherCurveList;
class SketcherPointX;
class SketcherPointY;
+class SketcherPointId;
class SketcherDrag;
class SketcherPointTypeItem;
class SketcherPointType;
class SketcherDrag;
class SketcherPointTypeItem;
class SketcherPointType;
@@
-51,9
+53,21
@@
class SketcherPointUp;
class SketcherPointDn;
class SketcherResetCurves;
class SketcherResetPoints;
class SketcherPointDn;
class SketcherResetCurves;
class SketcherResetPoints;
+class SketcherHelp;
class SketcherWindow;
class SketcherWindow;
+class SketcherCoord : public BC_TumbleTextBox
+{
+public:
+ SketcherWindow *gui;
+
+ SketcherCoord(SketcherWindow *gui, int x, int y, coord output,
+ coord mn=-32767, coord mx=32767);
+ ~SketcherCoord();
+ int update(coord v) { return BC_TumbleTextBox::update((coord)v); }
+};
+
class SketcherNum : public BC_TumbleTextBox
{
public:
class SketcherNum : public BC_TumbleTextBox
{
public:
@@
-81,52
+95,22
@@
public:
void update(int pen);
SketcherWindow *gui;
void update(int pen);
SketcherWindow *gui;
+ int pen;
};
};
-class SketcherCurveColor : public
BC_
Button
+class SketcherCurveColor : public
ColorBox
Button
{
public:
{
public:
- SketcherCurveColor(SketcherWindow *gui, int x, int y, int w, int h);
+ SketcherCurveColor(SketcherWindow *gui,
+ int x, int y, int w, int h, int color, int alpha);
~SketcherCurveColor();
~SketcherCurveColor();
- void set_color(int color);
- void update_gui(int color);
- int handle_event();
-
- int color;
- VFrame *vframes[3];
- SketcherWindow *gui;
-};
-
-class SketcherCurveColorPicker : public ColorPicker
-{
-public:
- SketcherCurveColorPicker(SketcherWindow *gui, SketcherCurveColor *curve_color);
- ~SketcherCurveColorPicker();
- void start(int color);
int handle_new_color(int color, int alpha);
int handle_new_color(int color, int alpha);
- void update_gui();
void handle_done_event(int result);
void handle_done_event(int result);
- SketcherWindow *gui;
int color;
int color;
- SketcherCurveColor *color_button;
- SketcherCurveColorThread *color_update;
-};
-
-class SketcherCurveColorThread : public Thread
-{
-public:
- SketcherCurveColorThread(SketcherCurveColorPicker *color_picker);
- ~SketcherCurveColorThread();
-
- void start();
- void stop();
- void run();
-
- SketcherCurveColorPicker *color_picker;
- int done;
- Condition *update_lock;
+ VFrame *vframes[3];
+ SketcherWindow *gui;
};
class SketcherNewCurve : public BC_GenericButton
};
class SketcherNewCurve : public BC_GenericButton
@@
-175,14
+159,39
@@
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();
+ void update(int width);
+ int width;
+};
+class SketcherAliasItem : public BC_MenuItem
+{
+public:
+ SketcherAliasItem(SketcherAliasing *popup, int v);
int handle_event();
int handle_event();
+
+ SketcherAliasing *popup;
+ int v;
+};
+
+class SketcherAliasing : public BC_PopupMenu
+{
+public:
+ SketcherAliasing(SketcherWindow *gui, Sketcher *plugin,
+ int x, int y);
+ ~SketcherAliasing();
+
+ const char *alias_to_text(int alias);
+ void create_objects();
+
+ Sketcher *plugin;
+ SketcherWindow *gui;
};
class SketcherCurveList : public BC_ListBox
};
class SketcherCurveList : public BC_ListBox
@@
-197,39
+206,48
@@
public:
ArrayList<BC_ListBoxItem*> cols[CV_SZ];
void clear();
void add_curve(const char *id, const char *pen,
ArrayList<BC_ListBoxItem*> cols[CV_SZ];
void clear();
void add_curve(const char *id, const char *pen,
- const char *
radius, const char *color
);
+ const char *
width, const char *color, const char *alpha
);
void del_curve(int i);
void del_curve(int i);
- void set_curve(int i, int c, const char *cp);
void set_selected(int k);
void update(int k);
void update_list(int k);
SketcherWindow *gui;
Sketcher *plugin;
void set_selected(int k);
void update(int k);
void update_list(int k);
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
{
@@
-243,19
+261,20
@@
public:
class SketcherPointTypeItem : public BC_MenuItem
{
public:
class SketcherPointTypeItem : public BC_MenuItem
{
public:
- SketcherPointTypeItem(int
pty
);
+ SketcherPointTypeItem(int
arc
);
int handle_event();
int handle_event();
- int
pty
;
+ int
arc
;
};
class SketcherPointType : public BC_PopupMenu
{
public:
};
class SketcherPointType : public BC_PopupMenu
{
public:
- SketcherPointType(SketcherWindow *gui, int x, int y, int
pty
);
+ SketcherPointType(SketcherWindow *gui, int x, int y, int
arc
);
void create_objects();
void create_objects();
- void update(int
pty
);
+ void update(int
arc
);
SketcherWindow *gui;
SketcherWindow *gui;
+ int type;
};
};
@@
-272,6
+291,7
@@
public:
void clear();
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 clear();
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, 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);
@@
-280,8
+300,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
@@
-354,6
+374,16
@@
public:
SketcherWindow *gui;
};
SketcherWindow *gui;
};
+class SketcherHelp : public BC_CheckBox
+{
+public:
+ SketcherHelp(SketcherWindow *gui, Sketcher *plugin, int x, int y);
+ ~SketcherHelp();
+ int handle_event();
+
+ Sketcher *plugin;
+ SketcherWindow *gui;
+};
class SketcherWindow : public PluginClientWindow
{
class SketcherWindow : public PluginClientWindow
{
@@
-362,44
+392,58
@@
public:
~SketcherWindow();
void create_objects();
~SketcherWindow();
void create_objects();
+ void done_event(int result);
void update_gui();
void update_gui();
- void start_color_thread(SketcherCurveColor *curve_color);
int grab_event(XEvent *event);
int do_grab_event(XEvent *event);
int grab_event(XEvent *event);
int do_grab_event(XEvent *event);
- void done_event(int result);
+ int handle_ungrab();
+ 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_pen, *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;
- SketcherCurveColorPicker *color_picker;
SketcherNewCurve *new_curve;
SketcherDelCurve *del_curve;
SketcherCurveUp *curve_up;
SketcherCurveDn *curve_dn;
SketcherNewCurve *new_curve;
SketcherDelCurve *del_curve;
SketcherCurveUp *curve_up;
SketcherCurveDn *curve_dn;
- SketcherCurveRadius *curve_radius;
+ SketcherCurveWidth *curve_width;
+ SketcherAliasing *aliasing;
SketcherCurveList *curve_list;
SketcherResetCurves *reset_curves;
SketcherCurveList *curve_list;
SketcherResetCurves *reset_curves;
+ SketcherHelp *help;
SketcherResetPoints *reset_points;
SketcherDrag *drag;
SketcherPointType *point_type;
SketcherPointList *point_list;
SketcherResetPoints *reset_points;
SketcherDrag *drag;
SketcherPointType *point_type;
SketcherPointList *point_list;
- BC_Title *title_x, *title_y;
+ 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;
+ int cursor_x, cursor_y;
+ float output_x, output_y;
+ float track_x, track_y;
+ int state, dragging;
+ int pending_motion, pending_config;
+ int helped, help_y, help_h;
+ XEvent motion_event;
float last_x, last_y;
float last_x, last_y;
- BC_Title *notes0, *notes1, *notes2;
+ int64_t last_time;
+ BC_Title *notes0, *notes1, *notes2, *notes3;
};
#endif
};
#endif