summaryrefslogtreecommitdiffstats
path: root/beos/liblayout/PropGadget.h
diff options
context:
space:
mode:
authorhandbrake <[email protected]>2006-01-14 13:21:55 +0000
committerhandbrake <[email protected]>2006-01-14 13:21:55 +0000
commitdc8de40de13c3f3e643b980a95ef48ccafb542e3 (patch)
tree953b97afe7082bbe2ce4247c703a51aa8e29a3c9 /beos/liblayout/PropGadget.h
parent4beb6a8b483c9d84677b21cc271ce315f136335c (diff)
HandBrake 0.6.0-test1
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@10 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'beos/liblayout/PropGadget.h')
-rw-r--r--beos/liblayout/PropGadget.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/beos/liblayout/PropGadget.h b/beos/liblayout/PropGadget.h
new file mode 100644
index 000000000..81a3f1f9b
--- /dev/null
+++ b/beos/liblayout/PropGadget.h
@@ -0,0 +1,75 @@
+
+#ifndef _PROPGADGET
+#define _PROPGADGET
+#include "layout.h"
+#include <Control.h>
+#include <Bitmap.h>
+
+class IMPEXPLIBLAYOUT PropGadget;
+
+typedef void (*propgadget_hook)(PropGadget*, void*, double, double);
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class PropGadget : public MView, public BControl
+{
+ public: PropGadget(double xprop, double xval, double yprop, double yval,
+ BBitmap *knobimage=NULL,
+ propgadget_hook=NULL,
+ void *callbackarg=NULL,
+ long extraspacing=0);
+ PropGadget(BMessage*);
+ virtual ~PropGadget();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ BBitmap* Pknob;
+
+ virtual void Draw(BRect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void MouseDown(BPoint);
+
+ void SetProportion(double, double);
+ void SetProportionNoDraw(double,double);
+ virtual void SetValues(double,double);
+ void SetValuesNoDraw(double,double);
+ virtual void FrameResized(float,float);
+ void ReDraw();
+ inline double Hval() {return hval;}
+ inline double Vval() {return 1.0-vval;}
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void setcolor(rgb_color col, bool deep=false);
+ virtual void DrawContainer(BRect);
+ virtual void DrawKnob(BRect);
+ virtual void KeyDown(const char *bytes, int32 numbytes);
+ bool IsBusy();
+
+ private: virtual void _expansionpropgadget1();
+ virtual void _expansionpropgadget2();
+
+ thread_id mousethread;
+ BPoint clickpoint;
+ BRect lastknobrect;
+ bool _isbusy;
+ bool vertical;
+ bool horizontal;
+
+ double hprop;
+ double hval;
+ double vprop;
+ double vval;
+ void (*callback)(PropGadget*,void*,double,double);
+ void *callbackarg;
+ long borderspacing;
+
+ static long _mousetracker(void *arg);
+ void _MouseTracker();
+
+ uint32 _expansiondata[2];
+};
+#endif