vdk 2.4.0
|
Databox widget. More...
#include <vdkdatabox.h>
Public Member Functions | |
VDKDataBox (VDKForm *owner) | |
Constructor. | |
~VDKDataBox () | |
Destructor. | |
VDKColor * | GetColor (int index) |
Get the color of a dataset. More... | |
void | SetColor (int index, VDKColor *color, bool redraw=true) |
Set the color of a dataset. More... | |
GtkDataboxValue | GetValue (GtkDataboxCoord coord) |
Get data value. More... | |
void | GetExtrema (GtkDataboxValue &min, GtkDataboxValue &max, bool visible=true) |
Get the extreme values. More... | |
void | Rescale (GtkDataboxValue min, GtkDataboxValue max) |
Rescale the databox using given minimum and maximum values. More... | |
void | Rescale () |
Rescale the databox using the minimum and maximum values from the datasets associated with the databox. | |
void | Redraw () |
Redraw the databox. Use it after you change your datas. | |
gint | RemoveData (gint index) |
Remove a single dataset. More... | |
gint | RemoveData () |
Remove all datasets. More... | |
gint | DestroyData (gint index) |
Remove a single dataset and destroy data associated with it. More... | |
gint | DestroyData () |
Remove all datasets and destroy data associated with them. More... | |
gint | AddXY (guint length, gfloat *X, gfloat *Y, VDKColor *color, GtkDataboxDataType type=GTK_DATABOX_POINTS, guint dotSize=1) |
Add a dataset. More... | |
gint | AddX (guint length, gfloat *X, guint indexSharedY, VDKColor *color, GtkDataboxDataType type=GTK_DATABOX_POINTS, guint dotSize=1) |
Add a dataset. More... | |
gint | AddY (guint length, gfloat *Y, guint indexSharedX, VDKColor *color, GtkDataboxDataType type=GTK_DATABOX_POINTS, guint dotSize=1) |
Add a dataset. More... | |
virtual void | SetBackground (VDKRgb color, GtkStateType state) |
![]() | |
VDKRgb | GetBackground (GtkStateType state=GTK_STATE_NORMAL) |
VDKRgb | GetForeground (GtkStateType state=GTK_STATE_NORMAL) |
VDKObject (VDKForm *owner=NULL) | |
VDKObject (VDKForm *owner, GtkWidget *widget) | |
virtual | ~VDKObject () |
bool | Destroy () |
virtual int | isA () |
VDKForm * | Owner () |
virtual GtkWidget * | Widget () |
GtkWidget * | ConnectingWidget () |
GtkWidget * | WrappedWidget () |
virtual void | SetFont (VDKFont *f) |
VDKFont * | GetFont () |
void | SetVisible (bool visible) |
bool | GetVisible () |
void | SetCursor (VDKCursorType) |
VDKCursorType | GetCursor () |
virtual void | SetForeground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL) |
void | SetSize (int w, int h) |
void | SetUsize (VDKPoint s) |
virtual void | SetTip (char *) |
virtual void | Add (VDKObject *obj, int justify=l_justify, int expand=TRUE, int fill=TRUE, int padding=0) |
ItemList & | Items () |
void | Draw (GdkRectangle *area=NULL) |
virtual void | Setup () |
void | SignalEmit (int signal) |
void | SignalEmit (char *sig) |
void | SignalEmitParent (int signal) |
void | SignalEmitParent (char *sig) |
void | GrabFocus () |
VDKObject * | Parent (VDKObject *p=NULL) |
int | SignalConnect (VDKObject *obj, char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false) |
int | SignalConnect (char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false) |
bool | SignalDisconnect (int connection) |
int | EventConnect (VDKObject *obj, char *event, bool(VDKObject::*method)(VDKObject *, GdkEvent *), bool after=false) |
int | EventConnect (char *, bool(VDKObject::*)(VDKObject *, GdkEvent *), bool after=false) |
bool | EventDisconnect (int connection) |
Public Attributes | |
VDKReadWriteValueProp < VDKDataBox, bool > | Rulers |
Shows or hides the rulers. | |
VDKReadWriteValueProp < VDKDataBox, bool > | Scrollbars |
Show or hides the scrollbars. | |
VDKReadWriteValueProp < VDKDataBox, bool > | Zoom |
Enable or disable the zoom. | |
VDKReadOnlyValueProp < VDKDataBox, GtkDataboxValue > | TopLeft |
Read the value of the top left corner of the window after a zoom. | |
VDKReadOnlyValueProp < VDKDataBox, GtkDataboxValue > | BottomRight |
Read the value of the bottom right corner of the window after a zoom. | |
VDKReadOnlyValueProp < VDKDataBox, GtkDataboxCoord > | Mark |
Read the value of the marked (where you clicked down the mouse) point. | |
VDKReadOnlyValueProp < VDKDataBox, GtkDataboxCoord > | Select |
Read the value of the selection. | |
![]() | |
VDKReadWriteValueProp < VDKObject, VDKRgb > | NormalBackground |
VDKReadWriteValueProp < VDKObject, VDKFont * > | Font |
SizeObjectProp | Usize |
VDKReadWriteValueProp < VDKObject, bool > | Enabled |
VDKReadWriteValueProp < VDKObject, VDKCursorType > | Cursor |
VDKReadWriteValueProp < VDKObject, bool > | Visible |
Additional Inherited Members | |
![]() | |
VDKObjectSignal | s_clicked |
GtkWidget * | widget |
GtkWidget * | sigwid |
VDKObject * | parent |
Databox widget.
This is a simple (almost 1:1) wrapper of GtkDatabox 0.1.11.0 widget. Some of the functions have been modified in order to return a value, instead to change the value sent as parameter, as I have thought this is more in the VDK spirit. Also, wherever the case, I used a VDKColor instead of GdkColor, for the same reason: VDK spirit.
The data box has the following styles (but check GtkDataboxDataType for other styles):
Public Members
Properties
Static Table Signals
Dynamic Table Signals
Dynamic table signals are different from the equivalent databox signals in that that they do not send values of the marked point or selection, for instance. These values can be read using the read-only properties.
gint VDKDataBox::AddX | ( | guint | length, |
gfloat * | X, | ||
guint | indexSharedY, | ||
VDKColor * | color, | ||
GtkDataboxDataType | type = GTK_DATABOX_POINTS , |
||
guint | dotSize = 1 |
||
) |
Add a dataset.
You must supply a X vector of data and an index to an existent Y vector. Also the number of points and a color to be used for ploting the dataset. If the number of points of X and shared Y vector are different, an error is generated.
length | number of points from the dataset. |
X | pointer to x vector of data. |
indexSharedY | index to a shared y vector of data. |
color | color for the ploting the dataset |
type | type of points. |
dotsize | size of the dots used. |
gint VDKDataBox::AddXY | ( | guint | length, |
gfloat * | X, | ||
gfloat * | Y, | ||
VDKColor * | color, | ||
GtkDataboxDataType | type = GTK_DATABOX_POINTS , |
||
guint | dotSize = 1 |
||
) |
Add a dataset.
Both X and Y must be supplied. Also the number of points and a color to be used for ploting the dataset.
length | number of points from the dataset. |
X | pointer to x vector of data. |
Y | pointer to y vector of data. |
color | color for the ploting the dataset |
type | type of points. |
dotsize | size of the dots used. |
gint VDKDataBox::AddY | ( | guint | length, |
gfloat * | Y, | ||
guint | indexSharedX, | ||
VDKColor * | color, | ||
GtkDataboxDataType | type = GTK_DATABOX_POINTS , |
||
guint | dotSize = 1 |
||
) |
Add a dataset.
You must supply a Y vector of data and an index to an existent X vector. Also the number of points and a color to be used for ploting the dataset. If the number of points of X and shared Y vector are different, an error is generated.
length | number of points from the dataset. |
Y | pointer to y vector of data. |
indexSharedX | index to a shared x vector of data. |
color | color for the ploting the dataset |
type | type of points. |
dotsize | size of the dots used. |
gint VDKDataBox::DestroyData | ( | gint | index | ) |
Remove a single dataset and destroy data associated with it.
index | index of dataset to be destroyed. |
gint VDKDataBox::DestroyData | ( | ) |
Remove all datasets and destroy data associated with them.
VDKColor * VDKDataBox::GetColor | ( | int | index | ) |
Get the color of a dataset.
index | dataset index |
void VDKDataBox::GetExtrema | ( | GtkDataboxValue & | min, |
GtkDataboxValue & | max, | ||
bool | visible = true |
||
) |
Get the extreme values.
min | returns the minimum x and y values of the databox. |
max | returns the maximum x and y values of the databox. |
visible | if true, then min and max are computed for the visible window; otherwise, they are computed for the whole databox. |
GtkDataboxValue VDKDataBox::GetValue | ( | GtkDataboxCoord | coord | ) |
Get data value.
coord | screen coordinates of a point. |
gint VDKDataBox::RemoveData | ( | gint | index | ) |
Remove a single dataset.
index | index of dataset to be removed. |
gint VDKDataBox::RemoveData | ( | ) |
Remove all datasets.
void VDKDataBox::Rescale | ( | GtkDataboxValue | min, |
GtkDataboxValue | max | ||
) |
Rescale the databox using given minimum and maximum values.
min | the minimum x and y values. |
max | the maximum x and y values. |
|
virtual |
void VDKDataBox::SetColor | ( | int | index, |
VDKColor * | color, | ||
bool | redraw = true |
||
) |
Set the color of a dataset.
index | dataset index |
color | new color for the dataset |
redraw | constrols if we call or not a subsequent Redraw(). Set to false if you don't want a redraw. |