phat-0.4.1/ 0000777 0000764 0000764 00000000000 10615757030 007471 5 0000000 0000000 phat-0.4.1/BUGS 0000644 0000764 0000764 00000000166 10405542275 010073 0000000 0000000 -*- text -*-
* Grab a fanslider and wiggle back and forth, sometimes the fan will
"lock up" and do funny things...
phat-0.4.1/NEWS 0000644 0000764 0000764 00000000102 10405542275 010075 0000000 0000000 Is this file supposed to be a ChangeLog for dummies or something?
phat-0.4.1/TODO 0000644 0000764 0000764 00000001267 10405542275 010103 0000000 0000000 -*- text -*-
---must---
* format specifier thing for sliderbuttons is LAME ASS! Just use a
num digits arg.
---gravy---
* add escaping to fansliders
* add ghosting to fansliders
* add support for update policies
* implement properties and style properties
* add default context menu (copy, paste, revert, previous);
perhaps use interfaces?
* use gconf to allow the user to set properties accross all
applications, create a config frontend
* add option to turn off fan drawing and mouse hiding/warping for
fansliders
* add fan threshold to fansliders
---magic---
* figure out how to make fanslider fans not flicker when pulled out to
the left or up (thresholds might help)
phat-0.4.1/docs/ 0000777 0000764 0000764 00000000000 10615757030 010421 5 0000000 0000000 phat-0.4.1/docs/xml/ 0000777 0000764 0000764 00000000000 10615757030 011221 5 0000000 0000000 phat-0.4.1/docs/xml/phathkeyboard.xml 0000644 0000764 0000764 00000011074 10615757030 014507 0000000 0000000
PhatHKeyboard3PHAT LibraryPhatHKeyboarda horizontal keyboard widgetSynopsis
PhatHKeyboard;
GtkWidget* phat_hkeyboard_new (GtkAdjustment *adjustment,
int numkeys,
gboolean show_labels);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkViewport
+----PhatKeyboard
+----PhatHKeyboard
Implemented Interfaces
PhatHKeyboard implements
AtkImplementorIface.DescriptionPhatHKeyboard is a wrapper for the abstract PhatKeyboard class.
After creating a PhatHKeyboard, you should interact with it using the
PhatKeyboard functions.
DetailsPhatHKeyboardPhatHKeyboardtypedef struct _PhatHKeyboard PhatHKeyboard;
The PhatHKeyboard struct contains private data only, and
should be accessed using the functions below.
phat_hkeyboard_new ()phat_hkeyboard_newGtkWidget* phat_hkeyboard_new (GtkAdjustment *adjustment,
int numkeys,
gboolean show_labels);
Creates a new PhatHKeyboard.adjustment : the GtkAdjustment that the new keyboard will use for scrolling
numkeys : number of keys to create
show_labels : whether to label the C keys
Returns : a newly created PhatHKeyboardSee AlsoPhatKeyboard provides functions for interacting with PhatHKeyboard widgets.
phat-0.4.1/docs/xml/phatkeyboard.xml 0000644 0000764 0000764 00000027665 10615757030 014354 0000000 0000000
PhatKeyboard3PHAT LibraryPhatKeyboarda base class for PhatHKeyboard and PhatVKeyboardSynopsis
_Key;
PhatKeyboard;
GtkAdjustment* phat_keyboard_get_adjustment (PhatKeyboard *keyboard);
void phat_keyboard_set_adjustment (PhatKeyboard *keyboard,
GtkAdjustment *adjustment);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkViewport
+----PhatKeyboard
+----PhatVKeyboard
+----PhatHKeyboard
Implemented Interfaces
PhatKeyboard implements
AtkImplementorIface.Properties
"numkeys" gint : Read / Write / Construct Only
"orientation" GtkOrientation : Read / Write / Construct Only
"show-labels" gboolean : Read / Write / Construct Only
Signals
"key-pressed"
void user_function (PhatKeyboard *keyboard,
gint key,
gpointer user_data) : Run first / Action
"key-released"
void user_function (PhatKeyboard *keyboard,
gint key,
gpointer user_data) : Run first / Action
Description
The PhatKeyboard widget family provides a simple piano-like keyboard.
Since it is derived from GtkViewport, it comes with the ability to
scroll. You don't have to worry about the values of the
GtkAdjustment it uses, just share said adjustment with a scrollbar
and you'll be in business.
PhatKeyboard is an abstract base class, from which PhatHKeyboard and
PhatVKeyboard are derived. To create a new keyboard, call either
phat_hkeyboard_new() or phat_vkeyboard_new().
Details_Key_Keytypedef struct {
int index;
PhatKeyboard* keyboard; /* the keyboard we belong to */
GnomeCanvasGroup* group; /* the group this key belongs to */
GnomeCanvasItem* pre; /* prelight rectangle */
GnomeCanvasItem* on; /* active (depressed) rectangle */
GnomeCanvasItem* shad; /* active shadow */
} _Key;
PhatKeyboardPhatKeyboardtypedef struct _PhatKeyboard PhatKeyboard;
The PhatKeyboard struct contains private data only, and should
be accessed using the functions below.
phat_keyboard_get_adjustment ()phat_keyboard_get_adjustmentGtkAdjustment* phat_keyboard_get_adjustment (PhatKeyboard *keyboard);
Retrives the current adjustment in use by keyboard.keyboard : a PhatKeyboardReturns :keyboard's current GtkAdjustmentphat_keyboard_set_adjustment ()phat_keyboard_set_adjustmentvoid phat_keyboard_set_adjustment (PhatKeyboard *keyboard,
GtkAdjustment *adjustment);
Sets the adjustment used by keyboard.keyboard : a PhatKeyboardadjustment : a GtkAdjustmentProperty DetailsThe "numkeys" propertyPhatKeyboard:numkeys "numkeys" gint : Read / Write / Construct OnlyHow many keys this keyboard should have.Allowed values: [1,1000]Default value: 128The "orientation" propertyPhatKeyboard:orientation "orientation" GtkOrientation : Read / Write / Construct OnlyHow the keyboard should be arranged on the screen.Default value: GTK_ORIENTATION_VERTICALThe "show-labels" propertyPhatKeyboard:show-labels "show-labels" gboolean : Read / Write / Construct OnlyWhether C keys should be labeled or not.Default value: TRUESignal DetailsThe "key-pressed" signalPhatKeyboard::key-pressedvoid user_function (PhatKeyboard *keyboard,
gint key,
gpointer user_data) : Run first / Action
The "key-pressed" signal is emitted whenever a key is pressed.keyboard : the object on which the signal was emitted
key : the index of the key that was pressed
user_data :user data set when the signal handler was connected.The "key-released" signalPhatKeyboard::key-releasedvoid user_function (PhatKeyboard *keyboard,
gint key,
gpointer user_data) : Run first / Action
The "key-released" signal is emitted whenever a key is released.keyboard : the object on which the signal was emitted
key : the index of the key that was pressed
user_data :user data set when the signal handler was connected.See AlsoPhatHKeyboard and PhatVKeyboard, to create new instances of PhatKeyboard.
phat-0.4.1/docs/xml/phatpad.xml 0000644 0000764 0000764 00000046044 10615757030 013310 0000000 0000000
PhatPad3PHAT LibraryPhatPadSynopsis
PhatPad;
GtkWidget* phat_pad_new ();
GtkAdjustment* phat_pad_get_ytilt (PhatPad *pad);
GtkAdjustment* phat_pad_get_xtilt (PhatPad *pad);
GtkAdjustment* phat_pad_get_pressure (PhatPad *pad);
GtkAdjustment* phat_pad_get_y (PhatPad *pad);
GtkAdjustment* phat_pad_get_x (PhatPad *pad);
void phat_pad_set_x_range (PhatPad *pad,
gdouble min,
gdouble max);
void phat_pad_set_y_range (PhatPad *pad,
gdouble min,
gdouble max);
void phat_pad_set_pressure_range (PhatPad *pad,
gdouble min,
gdouble max);
void phat_pad_set_x_log (PhatPad *pad,
gboolean is_log);
void phat_pad_set_y_log (PhatPad *pad,
gboolean is_log);
void phat_pad_set_xtilt_log (PhatPad *pad,
gboolean is_log);
void phat_pad_set_ytilt_log (PhatPad *pad,
gboolean is_log);
void phat_pad_set_pressure_log (PhatPad *pad,
gboolean is_log);
gboolean phat_pad_x_is_log (PhatPad *pad);
gboolean phat_pad_y_is_log (PhatPad *pad);
gboolean phat_pad_xtilt_is_log (PhatPad *pad);
gboolean phat_pad_ytilt_is_log (PhatPad *pad);
gboolean phat_pad_pressure_is_log (PhatPad *pad);
DescriptionDetailsPhatPadPhatPadtypedef struct {
GtkDrawingArea parent;
GdkPixmap* pixmap;
GtkAdjustment* pressure;
gboolean p_is_log;
GtkAdjustment* xtilt;
gboolean xt_is_log;
GtkAdjustment* ytilt;
gboolean yt_is_log;
GtkAdjustment* x;
gboolean x_is_log;
GtkAdjustment* y;
gboolean y_is_log;
} PhatPad;
phat_pad_new ()phat_pad_newGtkWidget* phat_pad_new ();
Creates a new PhatPad.Returns : a newly created PhatPadphat_pad_get_ytilt ()phat_pad_get_ytiltGtkAdjustment* phat_pad_get_ytilt (PhatPad *pad);
Retrieves the current ytilt value of the pad.pad : a PhatPadReturns : current ytilt value.
phat_pad_get_xtilt ()phat_pad_get_xtiltGtkAdjustment* phat_pad_get_xtilt (PhatPad *pad);
Retrieves the current xtilt value of the pad.pad : a PhatPadReturns : current xtilt value.
phat_pad_get_pressure ()phat_pad_get_pressureGtkAdjustment* phat_pad_get_pressure (PhatPad *pad);
Retrieves the current pressure value of the pad.pad : a PhatPadReturns : current pressure value.
phat_pad_get_y ()phat_pad_get_yGtkAdjustment* phat_pad_get_y (PhatPad *pad);
Retrieves the current y value of the pad.pad : a PhatPadReturns : current y value.
phat_pad_get_x ()phat_pad_get_xGtkAdjustment* phat_pad_get_x (PhatPad *pad);
Retrieves the current x value of the pad.pad : a PhatPadReturns : current x value.
phat_pad_set_x_range ()phat_pad_set_x_rangevoid phat_pad_set_x_range (PhatPad *pad,
gdouble min,
gdouble max);
Sets the x range of the pad.pad : a PhatPadmin :max :phat_pad_set_y_range ()phat_pad_set_y_rangevoid phat_pad_set_y_range (PhatPad *pad,
gdouble min,
gdouble max);pad :min :max :phat_pad_set_pressure_range ()phat_pad_set_pressure_rangevoid phat_pad_set_pressure_range (PhatPad *pad,
gdouble min,
gdouble max);pad :min :max :phat_pad_set_x_log ()phat_pad_set_x_logvoid phat_pad_set_x_log (PhatPad *pad,
gboolean is_log);pad :is_log :phat_pad_set_y_log ()phat_pad_set_y_logvoid phat_pad_set_y_log (PhatPad *pad,
gboolean is_log);pad :is_log :phat_pad_set_xtilt_log ()phat_pad_set_xtilt_logvoid phat_pad_set_xtilt_log (PhatPad *pad,
gboolean is_log);pad :is_log :phat_pad_set_ytilt_log ()phat_pad_set_ytilt_logvoid phat_pad_set_ytilt_log (PhatPad *pad,
gboolean is_log);pad :is_log :phat_pad_set_pressure_log ()phat_pad_set_pressure_logvoid phat_pad_set_pressure_log (PhatPad *pad,
gboolean is_log);pad :is_log :phat_pad_x_is_log ()phat_pad_x_is_loggboolean phat_pad_x_is_log (PhatPad *pad);pad :Returns :phat_pad_y_is_log ()phat_pad_y_is_loggboolean phat_pad_y_is_log (PhatPad *pad);pad :Returns :phat_pad_xtilt_is_log ()phat_pad_xtilt_is_loggboolean phat_pad_xtilt_is_log (PhatPad *pad);pad :Returns :phat_pad_ytilt_is_log ()phat_pad_ytilt_is_loggboolean phat_pad_ytilt_is_log (PhatPad *pad);pad :Returns :phat_pad_pressure_is_log ()phat_pad_pressure_is_loggboolean phat_pad_pressure_is_log (PhatPad *pad);pad :Returns :
phat-0.4.1/docs/xml/phatsliderbutton.xml 0000644 0000764 0000764 00000072456 10615757030 015270 0000000 0000000
PhatSliderButton3PHAT LibraryPhatSliderButton
retrieve an integer or floating-point number from the userSynopsis
PhatSliderButton;
GtkWidget* phat_slider_button_new (GtkAdjustment *adjustment,
int digits);
GtkWidget* phat_slider_button_new_with_range
(double value,
double lower,
double upper,
double step,
int digits);
void phat_slider_button_set_value (PhatSliderButton *button,
double value);
double phat_slider_button_get_value (PhatSliderButton *button);
void phat_slider_button_set_range (PhatSliderButton *button,
double lower,
double upper);
void phat_slider_button_get_range (PhatSliderButton *button,
double *lower,
double *upper);
void phat_slider_button_set_adjustment
(PhatSliderButton *button,
GtkAdjustment *adjustment);
GtkAdjustment* phat_slider_button_get_adjustment
(PhatSliderButton *button);
void phat_slider_button_set_increment
(PhatSliderButton *button,
double step,
double page);
void phat_slider_button_get_increment
(PhatSliderButton *button,
double *step,
double *page);
void phat_slider_button_set_format (PhatSliderButton *button,
int digits,
const char *prefix,
const char *postfix);
void phat_slider_button_get_format (PhatSliderButton *button,
int *digits,
char **prefix,
char **postfix);
void phat_slider_button_set_threshold
(PhatSliderButton *button,
guint threshold);
int phat_slider_button_get_threshold
(PhatSliderButton *button);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBox
+----GtkHBox
+----PhatSliderButton
Implemented Interfaces
PhatSliderButton implements
AtkImplementorIface.Signals
"changed" void user_function (PhatSliderButton *button,
gpointer user_data) : Run first / Action
"value-changed"
void user_function (PhatSliderButton *button,
gpointer user_data) : Run first / Action
Description
A PhatSliderButton can be used in place of a GtkSpinButton. It's a
better choice than a PhatFanSlider when you want the user to clearly
see the value they are setting, or want to constrain their selection
to a set of discrete values (fansliders are "continuous").
Sliderbuttons allow the user to change the value by grabbing the
widget and dragging. They can also make small "one off" adjustments
via the arrow buttons, or click the button to enter the value
directly. They have a slightly higher learning curve than standard
spinbuttons, but they offer much more efficiency to the user.
The way the current value of a sliderbutton is displayed is controlled
with a printf style format specifier supplied at widget creation.
Since sliderbuttons operate with doubles, the specifier should be in
the form of "%f" or any of the other double compatible printf escapes.
You should resist the urge to embed other information in the format
specifier, since that extra text will also wind up in the entry when
the user clicks the button. Instead, use
phat_slider_button_set_format() to set prefix and/or postfix text.
DetailsPhatSliderButtonPhatSliderButtontypedef struct _PhatSliderButton PhatSliderButton;
The PhatSliderButton struct contains private data only, and
should be accessed using the functions below.
phat_slider_button_new ()phat_slider_button_newGtkWidget* phat_slider_button_new (GtkAdjustment *adjustment,
int digits);
Creates a new PhatSliderButton.adjustment : the GtkAdjustment that the new button will use
digits : number of decimal digits to display
Returns : a newly created PhatSliderButtonphat_slider_button_new_with_range ()phat_slider_button_new_with_rangeGtkWidget* phat_slider_button_new_with_range
(double value,
double lower,
double upper,
double step,
int digits);
Creates a new PhatSliderButton. The slider will create a new
GtkAdjustment from value, lower, upper, and step. If these
parameters represent a bogus configuration, the program will
terminate.value : the initial value the new button should have
lower : the lowest value the new button will allow
upper : the highest value the new button will allow
step : increment added or subtracted when sliding
digits : number of decimal digits to display
Returns : a newly created PhatSliderButtonphat_slider_button_set_value ()phat_slider_button_set_valuevoid phat_slider_button_set_value (PhatSliderButton *button,
double value);
Sets the current value of the button. If the value is outside the
range of values allowed by button, it will be clamped. The button
emits the "value-changed" signal if the value changes.button : a PhatSliderButtonvalue : a new value for the button
phat_slider_button_get_value ()phat_slider_button_get_valuedouble phat_slider_button_get_value (PhatSliderButton *button);
Retrieves the current value of the button.button : a PhatSliderButtonReturns : current value of the button
phat_slider_button_set_range ()phat_slider_button_set_rangevoid phat_slider_button_set_range (PhatSliderButton *button,
double lower,
double upper);
Sets the range of allowable values for the button, and clamps the
button's current value to be between lower and upper.button : a PhatSliderButtonlower : lowest allowable value
upper : highest allowable value
phat_slider_button_get_range ()phat_slider_button_get_rangevoid phat_slider_button_get_range (PhatSliderButton *button,
double *lower,
double *upper);
Places the range of allowable values for button into lower
and upper. Either variable may be set to NULL if you are not
interested in its value.button : a PhatSliderButtonlower : retrieves lowest allowable value
upper : retrieves highest allowable value
phat_slider_button_set_adjustment ()phat_slider_button_set_adjustmentvoid phat_slider_button_set_adjustment
(PhatSliderButton *button,
GtkAdjustment *adjustment);
Sets the adjustment used by button. If adjustment is NULL, a
new adjustment with a value of zero and a range of [-1.0, 1.0] will
be created.button : a PhatSliderButtonadjustment : a GtkAdjustmentphat_slider_button_get_adjustment ()phat_slider_button_get_adjustmentGtkAdjustment* phat_slider_button_get_adjustment
(PhatSliderButton *button);
Retrives the current adjustment in use by button.button : a PhatSliderButtonReturns :button's current GtkAdjustmentphat_slider_button_set_increment ()phat_slider_button_set_incrementvoid phat_slider_button_set_increment
(PhatSliderButton *button,
double step,
double page);
Sets the increments the button should use.button : a PhatSliderButtonstep : step increment value
page : page increment value
phat_slider_button_get_increment ()phat_slider_button_get_incrementvoid phat_slider_button_get_increment
(PhatSliderButton *button,
double *step,
double *page);
Places the button's increment values into step and page. Either
variable may be set to NULL if you are not interested in its
value.button : a PhatSliderButtonstep : retrieves step increment value
page : retrieves page increment value
phat_slider_button_set_format ()phat_slider_button_set_formatvoid phat_slider_button_set_format (PhatSliderButton *button,
int digits,
const char *prefix,
const char *postfix);
Sets the way button renders it's label. If the first character in
either prefix or postfix is '\0' the corresponding parameter will
be unset. If you don't want to adjust digits, set it to a
negative value. If you don't want to adjust prefix and/or
postfix, set them to NULL.button : a PhatSliderButtondigits : number of decimal digits to display
prefix : text to prepend to number
postfix : text to append to number
phat_slider_button_get_format ()phat_slider_button_get_formatvoid phat_slider_button_get_format (PhatSliderButton *button,
int *digits,
char **prefix,
char **postfix);
Retrieves the information button uses to create its label. The
value returned will point to the button's local copy, so don't
write to it. Set the pointers for any value you aren't interested
in to NULL.button : a PhatSliderButtondigits : retrieves the number of decimal digits to display
prefix : retrieves text prepended to number
postfix : retrieves text appended to number
phat_slider_button_set_threshold ()phat_slider_button_set_thresholdvoid phat_slider_button_set_threshold
(PhatSliderButton *button,
guint threshold);
Sets the threshold for button. The threshold is how far the user
has to move the mouse to effect a change when sliding.button : a PhatSliderButtonthreshold : an unsigned int >= 1
phat_slider_button_get_threshold ()phat_slider_button_get_thresholdint phat_slider_button_get_threshold
(PhatSliderButton *button);
Retrieves the threshold for buttonbutton : a PhatSliderButtonReturns : the threshold for button, or -1 if button is invalid
Signal DetailsThe "changed" signalPhatSliderButton::changedvoid user_function (PhatSliderButton *button,
gpointer user_data) : Run first / Action
The "changed" signal is emitted when any parameter of the
slider's adjustment changes, except for the value parameter.button : the object on which the signal was emitted
user_data :user data set when the signal handler was connected.The "value-changed" signalPhatSliderButton::value-changedvoid user_function (PhatSliderButton *button,
gpointer user_data) : Run first / Action
The "value-changed" signal is emitted when the value of the
button's adjustment changes.button : the object on which the signal was emitted
user_data :user data set when the signal handler was connected.
phat-0.4.1/docs/xml/phatvkeyboard.xml 0000644 0000764 0000764 00000011072 10615757030 014523 0000000 0000000
PhatVKeyboard3PHAT LibraryPhatVKeyboarda vertical keyboard widgetSynopsis
PhatVKeyboard;
GtkWidget* phat_vkeyboard_new (GtkAdjustment *adjustment,
int numkeys,
gboolean show_labels);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkViewport
+----PhatKeyboard
+----PhatVKeyboard
Implemented Interfaces
PhatVKeyboard implements
AtkImplementorIface.DescriptionPhatVKeyboard is a wrapper for the abstract PhatKeyboard class.
After creating a PhatVKeyboard, you should interact with it using the
PhatKeyboard functions.
DetailsPhatVKeyboardPhatVKeyboardtypedef struct _PhatVKeyboard PhatVKeyboard;
The PhatVKeyboard struct contains private data only, and
should be accessed using the functions below.
phat_vkeyboard_new ()phat_vkeyboard_newGtkWidget* phat_vkeyboard_new (GtkAdjustment *adjustment,
int numkeys,
gboolean show_labels);
Creates a new PhatVKeyboard.adjustment : the GtkAdjustment that the new keyboard will use for scrolling
numkeys : number of keys to create
show_labels : whether to label the C keys
Returns : a newly created PhatVKeyboardSee AlsoPhatKeyboard provides functions for interacting with PhatVKeyboard widgets.
phat-0.4.1/docs/xml/phathfanslider.xml 0000644 0000764 0000764 00000014044 10615757030 014656 0000000 0000000
PhatHFanSlider3PHAT LibraryPhatHFanSlidera horizontal fanslider widget for selecting a floating point value from a rangeSynopsis
PhatHFanSlider;
GtkWidget* phat_hfan_slider_new (GtkAdjustment *adjustment);
GtkWidget* phat_hfan_slider_new_with_range (double value,
double lower,
double upper,
double step);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----PhatFanSlider
+----PhatHFanSlider
Implemented Interfaces
PhatHFanSlider implements
AtkImplementorIface.DescriptionPhatHFanSlider is a wrapper class for the abstract base
PhatFanSlider class. After creating a PhatHFanSlider, you should
interact with it using the PhatFanSlider functions.
DetailsPhatHFanSliderPhatHFanSlidertypedef struct _PhatHFanSlider PhatHFanSlider;
The PhatHFanSlider struct contains private data only, and
should be accessed using the functions below.
phat_hfan_slider_new ()phat_hfan_slider_newGtkWidget* phat_hfan_slider_new (GtkAdjustment *adjustment);
Creates a new PhatHFanSlider.adjustment : the GtkAdjustment that the new slider will use
Returns : a newly created PhatHFanSliderphat_hfan_slider_new_with_range ()phat_hfan_slider_new_with_rangeGtkWidget* phat_hfan_slider_new_with_range (double value,
double lower,
double upper,
double step);
Creates a new PhatHFanSlider. The slider will create a new GtkAdjustment
from value, lower, and upper. If these parameters represent a bogus
configuration, the program will terminate.value : the initial value the new slider should have
lower : the lowest value the new slider will allow
upper : the highest value the new slider will allow
step : increment added or subtracted when sliding
Returns : a newly created PhatHFanSliderSee AlsoPhatFanSlider provides functions for interacting with PhatHFanSlider widgets.
phat-0.4.1/docs/xml/phatvfanslider.xml 0000644 0000764 0000764 00000014042 10615757030 014672 0000000 0000000
PhatVFanSlider3PHAT LibraryPhatVFanSlidera vertical fanslider widget for selecting a floating point value from a rangeSynopsis
PhatVFanSlider;
GtkWidget* phat_vfan_slider_new (GtkAdjustment *adjustment);
GtkWidget* phat_vfan_slider_new_with_range (double value,
double lower,
double upper,
double step);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----PhatFanSlider
+----PhatVFanSlider
Implemented Interfaces
PhatVFanSlider implements
AtkImplementorIface.DescriptionPhatVFanSlider is a wrapper class for the abstract base
PhatFanSlider class. After creating a PhatVFanSlider, you should
interact with it using the PhatFanSlider functions.
DetailsPhatVFanSliderPhatVFanSlidertypedef struct _PhatVFanSlider PhatVFanSlider;
The PhatVFanSlider struct contains private data only, and
should be accessed using the functions below.
phat_vfan_slider_new ()phat_vfan_slider_newGtkWidget* phat_vfan_slider_new (GtkAdjustment *adjustment);
Creates a new PhatVFanSlider.adjustment : the GtkAdjustment that the new slider will use
Returns : a newly created PhatVFanSliderphat_vfan_slider_new_with_range ()phat_vfan_slider_new_with_rangeGtkWidget* phat_vfan_slider_new_with_range (double value,
double lower,
double upper,
double step);
Creates a new PhatVFanSlider. The slider will create a new GtkAdjustment
from value, lower, and upper. If these parameters represent a bogus
configuration, the program will terminate.value : the initial value the new slider should have
lower : the lowest value the new slider will allow
upper : the highest value the new slider will allow
step : increment added or subtracted when sliding
Returns : a newly created PhatVFanSliderSee AlsoPhatFanSlider provides functions for interacting with PhatVFanSlider widgets.
phat-0.4.1/docs/xml/phatfanslider.xml 0000644 0000764 0000764 00000051763 10615757030 014517 0000000 0000000
PhatFanSlider3PHAT LibraryPhatFanSlidera base class for PhatHFanSlider and PhatVFanSliderSynopsis
PhatFanSlider;
void phat_fan_slider_set_value (PhatFanSlider *slider,
double value);
void phat_fan_slider_set_log (PhatFanSlider *slider,
gboolean is_log);
gboolean phat_fan_slider_is_log (PhatFanSlider *slider);
double phat_fan_slider_get_value (PhatFanSlider *slider);
void phat_fan_slider_set_range (PhatFanSlider *slider,
double lower,
double upper);
void phat_fan_slider_get_range (PhatFanSlider *slider,
double *lower,
double *upper);
void phat_fan_slider_set_adjustment (PhatFanSlider *slider,
GtkAdjustment *adjustment);
GtkAdjustment* phat_fan_slider_get_adjustment
(PhatFanSlider *slider);
void phat_fan_slider_set_inverted (PhatFanSlider *slider,
gboolean inverted);
gboolean phat_fan_slider_get_inverted (PhatFanSlider *slider);
void phat_fan_slider_set_default_value
(PhatFanSlider *slider,
gdouble value);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----PhatFanSlider
+----PhatVFanSlider
+----PhatHFanSlider
Implemented Interfaces
PhatFanSlider implements
AtkImplementorIface.Signals
"changed" void user_function (PhatFanSlider *slider,
gpointer user_data) : Run first / Action
"value-changed"
void user_function (PhatFanSlider *slider,
gpointer user_data) : Run first / Action
Description
The PhatFanSlider widget family provides a slider widget for
retrieving floating point values from the user. The cool thing about
fansliders is that the user can have a great amount of precision in a
very small space. After depressing the left mouse button on a
fanslider, the user can then drag the pointer away from the widget,
causing a "fan" to popup which indicates the new scale they are
working with. The farther out the pointer is drawn, the greater the
size of the fan and the level of precision.
The fansliders work like most other numerical entry widgets; if you
know how to use a GtkSpinbutton, you know how to use a
PhatFanSlider. If not, check out the GTK+-2.0 tutorial.
You can change the colors that a given fanslider uses. Fansliders
use widget->style->base_gc[GTK_STATE_SELECTED] for the foreground color,
and widget->style->dark_gc[GTK_STATE_NORMAL] for the background color.
Adjusting these elements of the widget's style will change the way
the fanslider draws.
PhatFanSlider is an abstract base class, from which PhatHFanSlider and
PhatVFanSlider are derived. To create a new fanslider, call either
phat_vfanslider_new() or phat_hfanslider_new().
DetailsPhatFanSliderPhatFanSlidertypedef struct _PhatFanSlider PhatFanSlider;
The PhatFanSlider struct contains private data only, and
should be accessed using the functions below.
phat_fan_slider_set_value ()phat_fan_slider_set_valuevoid phat_fan_slider_set_value (PhatFanSlider *slider,
double value);
Sets the current value of the slider. If the value is outside the
range of values allowed by slider, it will be clamped to fit
within them. The slider emits the "value-changed" signal if the
value changes.slider : a PhatFanSlidervalue : a new value for the slider
phat_fan_slider_set_log ()phat_fan_slider_set_logvoid phat_fan_slider_set_log (PhatFanSlider *slider,
gboolean is_log);slider :is_log :phat_fan_slider_is_log ()phat_fan_slider_is_loggboolean phat_fan_slider_is_log (PhatFanSlider *slider);slider :Returns :phat_fan_slider_get_value ()phat_fan_slider_get_valuedouble phat_fan_slider_get_value (PhatFanSlider *slider);
Retrieves the current value of the slider.slider : a PhatFanSliderReturns : current value of the slider.
phat_fan_slider_set_range ()phat_fan_slider_set_rangevoid phat_fan_slider_set_range (PhatFanSlider *slider,
double lower,
double upper);
Sets the range of allowable values for the slider, and clamps the slider's
current value to be between lower and upper.slider : a PhatFanSliderlower : lowest allowable value
upper : highest allowable value
phat_fan_slider_get_range ()phat_fan_slider_get_rangevoid phat_fan_slider_get_range (PhatFanSlider *slider,
double *lower,
double *upper);
Places the range of allowable values for slider into lower
and upper. Either variable may be set to NULL if you are not
interested in its value.slider : a PhatFanSliderlower : retrieves lowest allowable value
upper : retrieves highest allowable value
phat_fan_slider_set_adjustment ()phat_fan_slider_set_adjustmentvoid phat_fan_slider_set_adjustment (PhatFanSlider *slider,
GtkAdjustment *adjustment);
Sets the adjustment used by slider. Every PhatFanSlider uses an
adjustment to store its current value and its range of allowable
values. If adjustment is NULL, a new adjustment with a value of
zero and a range of [-1.0, 1.0] will be created.slider : a PhatFanSlideradjustment : a GtkAdjustmentphat_fan_slider_get_adjustment ()phat_fan_slider_get_adjustmentGtkAdjustment* phat_fan_slider_get_adjustment
(PhatFanSlider *slider);
Retrives the current adjustment in use by slider.slider : a PhatFanSliderReturns :slider's current GtkAdjustmentphat_fan_slider_set_inverted ()phat_fan_slider_set_invertedvoid phat_fan_slider_set_inverted (PhatFanSlider *slider,
gboolean inverted);
Sets in which direction the fanslider should draw increasing
values. By default, horizontal fansliders draw low to high from
left to right, and vertical fansliders draw from bottom to top.
You can reverse this behavior by setting inverted to TRUE.slider : a PhatFanSliderinverted :TRUE to invert the fanslider
phat_fan_slider_get_inverted ()phat_fan_slider_get_invertedgboolean phat_fan_slider_get_inverted (PhatFanSlider *slider);
Determines whether slider is inverted or not.slider : a PhatFanSliderReturns :TRUE if slider is inverted
phat_fan_slider_set_default_value ()phat_fan_slider_set_default_valuevoid phat_fan_slider_set_default_value
(PhatFanSlider *slider,
gdouble value);
Set default value of the slider. Slider is reset to this value
when middle mouse button is pressed.slider : a PhatFanSlidervalue : the default value
Signal DetailsThe "changed" signalPhatFanSlider::changedvoid user_function (PhatFanSlider *slider,
gpointer user_data) : Run first / Action
The "changed" signal is emitted when any parameter of the
slider's adjustment changes, except for the value parameter.slider : the object on which the signal was emitted
user_data :user data set when the signal handler was connected.The "value-changed" signalPhatFanSlider::value-changedvoid user_function (PhatFanSlider *slider,
gpointer user_data) : Run first / Action
The "value-changed" signal is emitted when the value of the
slider's adjustment changes.slider : the object on which the signal was emitted
user_data :user data set when the signal handler was connected.See AlsoPhatHFanSlider and PhatVFanSlider to create instances of PhatFanSlider.
phat-0.4.1/docs/xml/phatknob.xml 0000644 0000764 0000764 00000031773 10615757030 013500 0000000 0000000
PhatKnob3PHAT LibraryPhatKnobSynopsis
PhatKnob;
GtkWidget* phat_knob_new (GtkAdjustment *adjustment);
GtkWidget* phat_knob_new_with_range (double value,
double lower,
double upper,
double step);
GtkAdjustment* phat_knob_get_adjustment (PhatKnob *knob);
double phat_knob_get_value (PhatKnob *knob);
void phat_knob_set_value (PhatKnob *knob,
double value);
void phat_knob_set_range (PhatKnob *knob,
double lower,
double upper);
void phat_knob_set_update_policy (PhatKnob *knob,
GtkUpdateType policy);
void phat_knob_set_adjustment (PhatKnob *knob,
GtkAdjustment *adjustment);
void phat_knob_set_log (PhatKnob *knob,
gboolean is_log);
gboolean phat_knob_is_log (PhatKnob *knob);
DescriptionDetailsPhatKnobPhatKnobtypedef struct {
GtkWidget widget;
/* The adjustment object that stores the data for this knob */
GtkAdjustment *adjustment;
GtkAdjustment* adjustment_prv;
/* update policy (GTK_UPDATE_[CONTINUOUS/DELAYED/DISCONTINUOUS]) */
guint policy : 2;
gboolean is_log;
/* State of widget (to do with user interaction) */
guint8 state;
gint saved_x, saved_y;
/* ID of update timer, or 0 if none */
guint32 timer;
/* Pixmap for knob */
GdkPixbuf *pixbuf;
GdkBitmap *mask;
GdkGC *mask_gc;
GdkGC *red_gc;
/* Old values from adjustment stored so we know when something changes */
gfloat old_value;
gfloat old_lower;
gfloat old_upper;
} PhatKnob;
phat_knob_new ()phat_knob_newGtkWidget* phat_knob_new (GtkAdjustment *adjustment);adjustment :Returns :phat_knob_new_with_range ()phat_knob_new_with_rangeGtkWidget* phat_knob_new_with_range (double value,
double lower,
double upper,
double step);
Creates a new PhatKnob. The knob will create a new
GtkAdjustment from value, lower, upper, and step. If these
parameters represent a bogus configuration, the program will
terminate.value : the initial value the new knob should have
lower : the lowest value the new knob will allow
upper : the highest value the new knob will allow
step : increment added or subtracted when turning
Returns : a newly created PhatKnobphat_knob_get_adjustment ()phat_knob_get_adjustmentGtkAdjustment* phat_knob_get_adjustment (PhatKnob *knob);knob :Returns :phat_knob_get_value ()phat_knob_get_valuedouble phat_knob_get_value (PhatKnob *knob);
Retrieves the current value of the knob.knob : a PhatKnobReturns : current value of the knob
phat_knob_set_value ()phat_knob_set_valuevoid phat_knob_set_value (PhatKnob *knob,
double value);
Sets the current value of the knob. If the value is outside the
range of values allowed by knob, it will be clamped. The knob
emits the "value-changed" signal if the value changes.knob : a PhatKnobvalue : a new value for the knob
phat_knob_set_range ()phat_knob_set_rangevoid phat_knob_set_range (PhatKnob *knob,
double lower,
double upper);
Sets the range of allowable values for the knob, and clamps the
knob's current value to be between lower and upper.knob : a PhatKnoblower : lowest allowable value
upper : highest allowable value
phat_knob_set_update_policy ()phat_knob_set_update_policyvoid phat_knob_set_update_policy (PhatKnob *knob,
GtkUpdateType policy);knob :policy :phat_knob_set_adjustment ()phat_knob_set_adjustmentvoid phat_knob_set_adjustment (PhatKnob *knob,
GtkAdjustment *adjustment);knob :adjustment :phat_knob_set_log ()phat_knob_set_logvoid phat_knob_set_log (PhatKnob *knob,
gboolean is_log);knob :is_log :phat_knob_is_log ()phat_knob_is_loggboolean phat_knob_is_log (PhatKnob *knob);knob :Returns :
phat-0.4.1/docs/html/ 0000777 0000764 0000764 00000000000 10615757030 011365 5 0000000 0000000 phat-0.4.1/docs/html/phat-PhatKnob.html 0000644 0000764 0000764 00000035621 10615757030 014636 0000000 0000000
typedef struct {
GtkWidget widget;
/* The adjustment object that stores the data for this knob */
GtkAdjustment *adjustment;
GtkAdjustment* adjustment_prv;
/* update policy (GTK_UPDATE_[CONTINUOUS/DELAYED/DISCONTINUOUS]) */
guint policy : 2;
gboolean is_log;
/* State of widget (to do with user interaction) */
guint8 state;
gint saved_x, saved_y;
/* ID of update timer, or 0 if none */
guint32 timer;
/* Pixmap for knob */
GdkPixbuf *pixbuf;
GdkBitmap *mask;
GdkGC *mask_gc;
GdkGC *red_gc;
/* Old values from adjustment stored so we know when something changes */
gfloat old_value;
gfloat old_lower;
gfloat old_upper;
} PhatKnob;
Creates a new PhatKnob. The knob will create a new
GtkAdjustment from value, lower, upper, and step. If these
parameters represent a bogus configuration, the program will
terminate.
Sets the current value of the knob. If the value is outside the
range of values allowed by knob, it will be clamped. The knob
emits the "value-changed" signal if the value changes.