A simple preview component that shows thumbnails of image files. More...
Inherits FilePreviewComponent, and Timer.
Public Member Functions | |
| ImagePreviewComponent () | |
| Creates an ImagePreviewComponent. | |
| ~ImagePreviewComponent () | |
| Destructor. | |
| void | selectedFileChanged (const File &newSelectedFile) |
| Called to indicate that the user's currently selected file has changed. | |
| void | paint (Graphics &g) |
| Components can override this method to draw their content. | |
| void | timerCallback () |
| The user-defined callback routine that actually gets called periodically. | |
A simple preview component that shows thumbnails of image files.
| ImagePreviewComponent::ImagePreviewComponent | ( | ) |
Creates an ImagePreviewComponent.
| ImagePreviewComponent::~ImagePreviewComponent | ( | ) |
Destructor.
| void ImagePreviewComponent::selectedFileChanged | ( | const File & | newSelectedFile ) | [virtual] |
Called to indicate that the user's currently selected file has changed.
| newSelectedFile | the newly selected file or directory, which may be File::nonexistent if none is selected. |
Implements FilePreviewComponent.
| void ImagePreviewComponent::paint | ( | Graphics & | g ) | [virtual] |
Components can override this method to draw their content.
The paint() method gets called when a region of a component needs redrawing, either because the component's repaint() method has been called, or because something has happened on the screen that means a section of a window needs to be redrawn.
Any child components will draw themselves over whatever this method draws. If you need to paint over the top of your child components, you can also implement the paintOverChildren() method to do this.
If you want to cause a component to redraw itself, this is done asynchronously - calling the repaint() method marks a region of the component as "dirty", and the paint() method will automatically be called sometime later, by the message thread, to paint any bits that need refreshing. In Juce (and almost all modern UI frameworks), you never redraw something synchronously.
You should never need to call this method directly - to take a snapshot of the component you could use createComponentSnapshot() or paintEntireComponent().
| g | the graphics context that must be used to do the drawing operations. |
Reimplemented from Component.
| void ImagePreviewComponent::timerCallback | ( | ) | [virtual] |
The user-defined callback routine that actually gets called periodically.
It's perfectly ok to call startTimer() or stopTimer() from within this callback to change the subsequent intervals.
Implements Timer.