11 #include "SlideShowPicture.h" 13 #include "threads/Event.h" 14 #include "threads/Thread.h" 15 #include "utils/SortUtils.h" 32 void LoadPic(
int iPic,
int iSlideNumber,
const std::string &strFileName,
const int maxWidth,
const int maxHeight);
33 bool IsLoading() {
return m_isLoading; }
34 int SlideNumber()
const {
return m_iSlideNumber; }
35 int Pic()
const {
return m_iPic; }
38 void Process()
override;
41 std::string m_strFileName;
59 bool OnAction(
const CAction &action)
override;
60 void Render()
override;
61 void RenderEx()
override;
62 void Process(
unsigned int currentTime, CDirtyRegionList ®ions)
override;
63 void OnDeinitWindow(
int nextWindowID)
override;
67 bool IsPlaying()
const;
68 void Select(
const std::string& strPicture);
70 std::shared_ptr<const CFileItem> GetCurrentSlide();
71 void RunSlideShow(
const std::string &strPath,
bool bRecursive =
false,
72 bool bRandom =
false,
bool bNotRandom =
false,
73 const std::string &beginSlidePath=
"",
bool startSlideShow =
true,
75 SortOrder order = SortOrderAscending,
76 SortAttribute sortAttributes = SortAttributeNone,
77 const std::string &strExtensions=
"");
78 void AddFromPath(
const std::string &strPath,
bool bRecursive,
80 SortOrder order = SortOrderAscending,
81 SortAttribute sortAttributes = SortAttributeNone,
82 const std::string &strExtensions=
"");
83 void StartSlideShow();
84 bool InSlideShow()
const;
85 void OnLoadPic(
int iPic,
87 const std::string& strFileName,
88 std::unique_ptr<CTexture> pTexture,
90 int NumSlides()
const;
91 int CurrentSlide()
const;
93 bool IsPaused()
const {
return m_bPause; }
94 bool IsShuffled()
const {
return m_bShuffled; }
95 int GetDirection()
const {
return m_iDirection; }
97 static void RunSlideShow(
const std::vector<std::string>& paths,
int start = 0);
102 void SetDirection(
int direction);
104 typedef std::set<std::string> path_set;
105 void AddItems(
const std::string &strPath, path_set *recursivePaths,
107 SortOrder order = SortOrderAscending,
108 SortAttribute sortAttributes = SortAttributeNone);
110 CSlideShowPic::DISPLAY_EFFECT GetDisplayEffect(
int iSlideNumber)
const;
112 void RenderErrorMessage();
113 void Rotate(
float fAngle,
bool immediate =
false);
114 void Zoom(
int iZoom);
115 void ZoomRelative(
float fZoom,
bool immediate =
false);
116 void Move(
float fX,
float fY);
117 void GetCheckedSize(
float width,
float height,
int &maxWidth,
int &maxHeight);
118 std::string GetPicturePath(
CFileItem *item);
121 void AnnouncePlayerPlay(
const CFileItemPtr& item);
122 void AnnouncePlayerPause(
const CFileItemPtr& item);
123 void AnnouncePlayerStop(
const CFileItemPtr& item);
124 void AnnouncePlaylistClear();
125 void AnnouncePlaylistAdd(
const CFileItemPtr& item,
int pos);
126 void AnnouncePropertyChanged(
const std::string &strProperty,
const CVariant &value);
132 float m_fInitialRotate;
135 float m_fInitialZoom;
140 bool m_bPlayingVideo;
141 int m_iVideoSlide = -1;
142 bool m_bErrorMessage;
144 std::vector<CFileItemPtr> m_slides;
150 std::unique_ptr<CBackgroundPicLoader> m_pBackgroundLoader;
151 int m_iLastFailedNextSlide;
153 RESOLUTION m_Resolution;
154 CPoint m_firstGesturePoint;
This is an Event class built from a ConditionVariable.
Definition: Event.h:35
Definition: SlideShowPicture.h:25
Represents a list of files.
Definition: FileItem.h:713
Definition: GUIWindowSlideShow.h:51
EVENT_RESULT
Results of OnMouseEvent() Any value not equal to EVENT_RESULT_UNHANDLED indicates that the event was ...
Definition: GUIControl.h:60
Definition: GUIWindowSlideShow.h:25
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: GUIDialog.h:35
Definition: LibInputPointer.h:13
Definition: GUIMessage.h:365
SortBy
Definition: SortUtils.h:49
Represents a file on a share.
Definition: FileItem.h:102
Simple class for mouse events.
Definition: Key.h:114
1 : Sort by Name (String: Label)
Definition: SortUtils.h:54