#include <Thumbnails.h>
Public Member Functions | |
wxThumbnails (wxWindow *parent, int id) | |
void | Clear () |
Removes all thumbnails (items). | |
void | ShowDir (wxString dir, int filter=-1) |
Shows a thumbnils of images from the given directory. | |
bool | IsCustomFile (const wxString &fname) |
void | AddCustomExtention (const wxString &ext) |
void | ClearCustomExtentions () |
void | SetFilter (int filter) |
sets filter | |
int | GetSelected (int selIndex=-1) |
Return the index of the selected thumbnail. | |
wxThumb * | GetSelectedItem (int selIndex=-1) |
int | GetSelectedCount () |
bool | IsSelected (int index) |
void | SetSelected (int value) |
void | AddToSelection (int value) |
int | GetPointed () |
Return the index of the pointed thumbnail. | |
wxThumb * | GetPointedItem () |
wxThumb * | GetItem (int index) |
int | GetItemCount () |
void | InsertItem (wxThumb *thumb, int pos=-1) |
void | RemoveItemAt (int pos, int count=1) |
void | SortItems () |
virtual void | UpdateItems () |
Rereads directory. | |
void | SetThumbSize (int width, int height, int border=8) |
void | GetThumbSize (int &width, int &height, int &border) |
int | GetThumbWidth () |
int | GetThumbHeight () |
int | GetThumbBorder () |
virtual void | SetCaption (wxString caption) |
wxString | GetCaption () |
void | SetLabelControl (wxStaticText *value) |
void | ShowFileNames (bool value=true) |
void | SetOrientaion (int value=wxTHUMB_VERTICAL) |
void | SetPopupMenu (wxMenu *menu) |
Sets the item pop up menu. | |
wxMenu * | GetPopupMenu () |
Returns the pop up menu if it was set, or null otherwise. | |
void | SetGlobalPopupMenu (wxMenu *menu) |
Sets the global pop up menu (if no item is selected). | |
wxMenu * | GetGloalPopupMenu () |
Returns the pop up menu if it was set, or null otherwise. | |
void | EnableDragging (bool value=true) |
Static Public Member Functions | |
bool | IsAudioVideo (const wxString &fname) |
bool | IsVideo (const wxString &fname) |
bool | IsAudio (const wxString &fname) |
Protected Member Functions | |
virtual int | GetCaptionHeight (int begRow, int count=1) |
virtual int | GetItemIndex (int x, int y) |
virtual void | UpdateProp (bool checkSize=true) |
virtual void | ScrollToSelected () |
virtual void | DrawThumbnail (wxBitmap &bmp, wxThumb &thumb, int index) |
virtual void | OnPaint (wxPaintEvent &WXUNUSED(event)) |
virtual void | OnResize (wxSizeEvent &event) |
virtual void | OnMouseDown (wxMouseEvent &event) |
virtual void | OnMouseUp (wxMouseEvent &event) |
virtual void | OnMouseDClick (wxMouseEvent &event) |
virtual void | OnMouseMove (wxMouseEvent &event) |
virtual void | OnMouseLeave (wxMouseEvent &event) |
virtual void | OnThumbChanged (wxCommandEvent &event) |
virtual void | OnEraseBackground (wxEraseEvent &event) |
wxRect | GetPaintRect () |
virtual void | UpdateItemsInt () |
Protected Attributes | |
int | m_tWidth |
Parameters of thumbnail. | |
int | m_tHeight |
int | m_tBorder |
int | m_tCaptionBorder |
wxArrayInt | m_tCaptionHeight |
int | m_tTextHeight |
wxThumbOutline | m_tOutline |
bool | m_tOutlineNotSelected |
int | m_selected |
wxArrayInt | m_selectedArray |
int | m_pointed |
wxString | m_dir |
int | m_filter |
wxString | m_caption |
wxThumbArray | m_items |
int | m_cols |
int | m_rows |
wxStaticText * | m_labelControl |
wxMenu * | m_pmenu |
wxMenu * | m_gpmenu |
bool | m_allowDragging |
bool | m_mouseEventHandled |
bool | m_showFileNames |
int | m_orient |
wxArrayString | m_customExtentions |
list of custom extentions |
This class use pathched jpeg handler (imagjog.h). To activate this handler use following the code (after wxInitAllImageHandlers):
if (!wxImage::RemoveHandler(_T("JPEG file"))) wxMessageBox(_T("Can't remove old JPEG handler")); wxImage::InsertHandler(new wxJPGHandler);