golib  0.5
goGUI::ImageControl Class Reference

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...
 
- Public Member Functions inherited from goGUI::Control
 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.
 

Detailed Description

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.

Member Function Documentation

◆ addImage()

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.

Parameters
imgImage to add.

◆ getImageChangedCaller()

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.

Returns
The respective goCaller.

◆ imageViewChanged()

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.

Parameters
codeOne of ImageView::CURRENT_IMAGE_CHANGED, ImageView::IMAGE_SET, ImageView::IMAGE_REMOVED.

◆ setImageView()

void goGUI::ImageControl::setImageView ( ImageView iv)

Set the ImageView object.

Parameters
ivThe ImageView object to be used with this ImageControl.

The documentation for this class was generated from the following files: