golib
0.5
|
Control widget for images in an ImageView. More...
#include <imagecontrol.h>
Public Member Functions | |
void | loadImage () |
Pop up a file open dialog and load an image. | |
void | addImage (goAutoPtr< goSignal3DBase< void > > img) |
Add the image given as goAutoPtr. More... | |
void | setImageView (ImageView *iv) |
Set the ImageView object. More... | |
void | imageViewChanged (int) |
Slot that gets called whenever the image view changes. More... | |
void | treeViewDragEnd (const Glib::RefPtr< Gdk::DragContext > &context) |
goCaller1< void, goAutoPtr< goSignal3DBase< void > > > & | getImageChangedCaller () |
This goCaller is called whenever the current image changes. More... | |
![]() | |
Control (const char *title) | |
virtual void | warning (const char *text) |
virtual void | message (const char *text) |
virtual void | print (const char *text) |
Protected Member Functions | |
void | treeRowActivated (const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *col) |
void | treeViewButtonPressed (GdkEventButton *) |
void | treeDeleteImage () |
Delete the current selection of images. | |
Control widget for images in an ImageView.
This control is used with an ImageView object. It displays a Gtk::TreeView showing the images in the ImageView and lets the user do things like deleting images and re-ordering them by drag and drop.
void goGUI::ImageControl::addImage | ( | goAutoPtr< goSignal3DBase< void > > | img | ) |
Add the image given as goAutoPtr.
The image is just added to the ImageView, and is being deep copied. The goAutoPtr is currently not copied. The image is also automatically converted by ImageView to be displayable — this means the original data format is probably not retained in the copied version of the image.
img | Image to add. |
goCaller1< void, goAutoPtr< goSignal3DBase< void > > > & goGUI::ImageControl::getImageChangedCaller | ( | ) |
This goCaller is called whenever the current image changes.
The parameter of the caller is a pointer to the current image.
void goGUI::ImageControl::imageViewChanged | ( | int | code | ) |
Slot that gets called whenever the image view changes.
If the current image has changed, the caller returned by getImageChangedCaller() gets called with the new current image as argument. In the other cases, the treeview showing the images gets rebuilt.
code | One of ImageView::CURRENT_IMAGE_CHANGED, ImageView::IMAGE_SET, ImageView::IMAGE_REMOVED. |
void goGUI::ImageControl::setImageView | ( | ImageView * | iv | ) |
Set the ImageView object.
iv | The ImageView object to be used with this ImageControl. |