8 #ifndef META_OCEAN_PLATFORM_WXWIDGETS_FRAME_PREVIEW_WINDOW_H
9 #define META_OCEAN_PLATFORM_WXWIDGETS_FRAME_PREVIEW_WINDOW_H
58 inline Element(
const unsigned int index,
const int virtualPositionStart,
const unsigned int displayId);
64 inline unsigned int index()
const;
70 inline int virtualPositionStart()
const;
76 inline unsigned int displayId()
const;
84 inline int displayPositionStart(
const int windowVirtualPositionStart,
const unsigned int zoom)
const;
93 inline int displayPositionStop(
const int windowVirtualPositionStart,
const unsigned int previewWidth,
const unsigned int zoom)
const;
102 inline int displayPositionEnd(
const int windowVirtualPositionStart,
const unsigned int previewWidth,
const unsigned int zoom)
const;
108 explicit inline operator bool()
const;
113 unsigned int index_ = (
unsigned int)(-1);
116 int virtualPositionStart_ = 0;
119 unsigned int displayId_ = 0u;
136 FramePreviewWindow(
const wxString& title,
wxWindow* parent =
nullptr,
const wxPoint& pos = wxPoint(-1, -1),
const wxSize& size = wxSize(-1, 100));
153 inline unsigned int selectionIndex()
const;
159 inline bool displayFrameIndex()
const;
165 inline void setDisplayFrameIndex(
const bool display);
288 static bool calculateFirstVisibleElement(
const int windowVirtualPositionStart,
const unsigned int previewWidth,
const unsigned int separatorWidth,
const unsigned int zoom,
const bool adjust2zoom,
int& index);
301 static bool calculateLastVisibleElement(
const int windowVirtualPositionStart,
const unsigned int displayWidth,
const unsigned int previewWidth,
const unsigned int separatorWidth,
const unsigned int zoom,
const bool adjust2zoom,
int& index);
312 static bool calculateVirtualPositionStart(
const unsigned int index,
const unsigned int previewWidth,
const unsigned int separatorWidth,
const unsigned int zoom,
int& position);
322 void drawFrame(wxDC& dc,
const Frame& frame,
const unsigned int frameIndex,
const int displayPositionLeft,
const bool selection);
330 unsigned int frameNumber_ = 0u;
333 unsigned int separatorWidth_ = 2u;
336 unsigned int virtualWidth_ = 0u;
339 int virtualPositionStart_ = 0;
342 unsigned int previewWidth_ = 0u;
345 unsigned int previewHeight_ = 0u;
348 unsigned int previewZoom_ = 50u;
354 unsigned int selectionIndex_ = (
unsigned int)(-1);
357 bool displayFrameIndex_ =
true;
363 bool newPreviewFrame_ =
false;
368 virtualPositionStart_(virtualPositionStart),
369 displayId_(displayId)
396 return virtualPositionStart_ / int(zoom) - windowVirtualPositionStart / int(zoom) + int(previewWidth) - 1;
401 return virtualPositionStart_ / int(zoom) - windowVirtualPositionStart / int(zoom) + int(previewWidth);
404 inline FramePreviewWindow::Element::operator bool()
const
406 return index_ != (
unsigned int)-1;
This class implements Ocean's image class.
Definition: Frame.h:1792
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15