Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CGUIWindowVideoBase Class Reference

#include <GUIWindowVideoBase.h>

Inheritance diagram for CGUIWindowVideoBase:
CGUIMediaWindow IBackgroundLoaderObserver CGUIWindow CGUIControlGroup CCriticalSection CGUIControlLookup XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex > CGUIControl CGUIWindowVideoNav CGUIWindowVideoPlaylist

Public Member Functions

 CGUIWindowVideoBase (int id, const std::string &xmlFile)
 
 ~CGUIWindowVideoBase (void) override
 
bool OnMessage (CGUIMessage &message) override
 
bool OnAction (const CAction &action) override
 
void PlayMovie (const CFileItem *item, const std::string &player="")
 
void AddToDatabase (int iItem)
 
virtual void OnItemInfo (const CFileItem &fileItem, ADDON::ScraperPtr &scraper)
 
- Public Member Functions inherited from CGUIMediaWindow
 CGUIMediaWindow (int id, const char *xmlFile)
 
 ~CGUIMediaWindow (void) override
 
bool OnAction (const CAction &action) override
 
bool OnBack (int actionID) override
 
bool OnMessage (CGUIMessage &message) override
 
void OnWindowLoaded () override
 
void OnWindowUnload () override
 
void OnInitWindow () override
 Called on window open. More...
 
bool IsMediaWindow () const override
 
int GetViewContainerID () const override
 
int GetViewCount () const override
 
bool HasListItems () const override
 
CFileItemPtr GetCurrentListItem (int offset=0) override
 
virtual bool CanFilterAdvanced ()
 
virtual bool IsFiltered ()
 
virtual bool IsSameStartFolder (const std::string &dir)
 
virtual std::string GetRootPath () const
 
const CFileItemListCurrentDirectory () const
 
const CGUIViewStateGetViewState () const
 
virtual bool UseFileDirectories ()
 
- Public Member Functions inherited from CGUIWindow
 CGUIWindow (int id, const std::string &xmlFile)
 
 ~CGUIWindow (void) override
 
bool Initialize ()
 
bool Load (const std::string &strFileName, bool bContainsPath=false)
 
void CenterWindow ()
 
void DoProcess (unsigned int currentTime, CDirtyRegionList &dirtyregions) override
 
void DoRender () override
 Main render function, called every frame. Window classes should override this only if they need to alter how something is rendered. General updating on a per-frame basis should be handled in FrameMove instead, as DoRender is not necessarily re-entrant. More...
 
void AfterRender ()
 Do any post render activities. Check if window closing animation is finished and finalize window closing. More...
 
virtual void FrameMove ()
 Main update function, called every frame prior to rendering Any window that requires updating on a frame by frame basis (such as to maintain timers and the like) should override this function. More...
 
void Close (bool forceClose=false, int nextWindowID=0, bool enableSound=true, bool bWait=true)
 
virtual bool OnInfo (int actionID)
 
virtual void ClearBackground ()
 Clear the background (if necessary) prior to rendering the window. More...
 
bool OnMove (int fromControl, int moveAction)
 
bool ControlGroupHasFocus (int groupID, int controlID)
 
void SetID (int id) override
 
virtual bool HasID (int controlID) const
 
const std::vector< int > & GetIDRange () const
 
int GetPreviousWindow ()
 
CRect GetScaledBounds () const
 
void ClearAll () override
 
virtual void AllocResources (bool forceLoad=false)
 
void FreeResources (bool forceUnLoad=false) override
 
void DynamicResourceAlloc (bool bOnOff) override
 
virtual bool IsDialog () const
 
virtual bool IsDialogRunning () const
 
virtual bool IsModalDialog () const
 
virtual bool IsSoundEnabled () const
 
virtual bool CanBeActivated () const
 
virtual bool IsActive () const
 
void SetCoordsRes (const RESOLUTION_INFO &res)
 
const RESOLUTION_INFOGetCoordsRes () const
 
void SetLoadType (LOAD_TYPE loadType)
 
LOAD_TYPE GetLoadType ()
 
int GetRenderOrder ()
 
void SetInitialVisibility () override
 
bool IsVisible () const override
 
virtual bool HasVisibleControls ()
 
bool IsAnimating (ANIMATION_TYPE animType) override
 
bool IsCustom () const
 Return if the window is a custom window. More...
 
void SetCustom (bool custom)
 Mark this window as custom window. More...
 
void DisableAnimations ()
 
virtual void ResetControlStates ()
 
void UpdateControlStats () override
 
void SetRunActionsManually ()
 
void RunLoadActions () const
 
void RunUnloadActions () const
 
void SetProperty (const std::string &key, const CVariant &value)
 Set a property Sets the value of a property referenced by a key. More...
 
CVariant GetProperty (const std::string &key) const
 Retrieve a property. More...
 
void ClearProperties ()
 Clear a all the window's properties. More...
 
bool HasSaveLastControl () const
 
virtual void OnDeinitWindow (int nextWindowID)
 
void AllocResources () override
 
- Public Member Functions inherited from CGUIControlGroup
 CGUIControlGroup ()
 
 CGUIControlGroup (int parentID, int controlID, float posX, float posY, float width, float height)
 
 CGUIControlGroup (const CGUIControlGroup &from)
 
 ~CGUIControlGroup (void) override
 
CGUIControlGroupClone () const override
 
void Process (unsigned int currentTime, CDirtyRegionList &dirtyregions) override
 
void Render () override
 
void RenderEx () override
 
virtual bool SendControlMessage (CGUIMessage &message)
 
bool HasFocus () const override
 
bool CanFocus () const override
 
EVENT_RESULT SendMouseEvent (const CPoint &point, const CMouseEvent &event) override
 React to a mouse event. More...
 
void UnfocusFromPoint (const CPoint &point) override
 Unfocus the control if the given point on screen is not within it's boundary. More...
 
bool HasAnimation (ANIMATION_TYPE anim) override
 
void QueueAnimation (ANIMATION_TYPE anim) override
 
void ResetAnimation (ANIMATION_TYPE anim) override
 
void ResetAnimations () override
 
int GetFocusedControlID () const
 
CGUIControlGetFocusedControl () const
 
virtual void AddControl (CGUIControl *control, int position=-1)
 
bool InsertControl (CGUIControl *control, const CGUIControl *insertPoint)
 
virtual bool RemoveControl (const CGUIControl *control)
 
void SetDefaultControl (int id, bool always)
 
void SetRenderFocusedLast (bool renderLast)
 
void SaveStates (std::vector< CControlState > &states) override
 
bool IsGroup () const override
 
- Public Member Functions inherited from CGUIControlLookup
 CGUIControlLookup ()=default
 
 CGUIControlLookup (int parentID, int controlID, float posX, float posY, float width, float height)
 
 CGUIControlLookup (const CGUIControlLookup &from)
 
 ~CGUIControlLookup (void) override=default
 
CGUIControlGetControl (int id, std::vector< CGUIControl * > *idCollector=nullptr) override
 
- Public Member Functions inherited from CGUIControl
 CGUIControl ()
 
 CGUIControl (int parentID, int controlID, float posX, float posY, float width, float height)
 
 CGUIControl (const CGUIControl &)
 
virtual ~CGUIControl (void)
 
bool HasProcessed () const
 Returns whether or not we have processed. More...
 
virtual void OnUp ()
 
virtual void OnDown ()
 
virtual void OnLeft ()
 
virtual void OnRight ()
 
virtual bool OnBack ()
 
virtual bool OnInfo ()
 
virtual void OnNextControl ()
 
virtual void OnPrevControl ()
 
virtual void OnFocus ()
 
virtual void OnUnFocus ()
 
virtual bool HitTest (const CPoint &point) const
 Used to test whether the point is inside a control. More...
 
virtual int GetID (void) const
 
int GetParentID () const
 
virtual bool IsDynamicallyAllocated ()
 
bool IsVisibleFromSkin () const
 
virtual bool IsDisabled () const
 
virtual void SetPosition (float posX, float posY)
 
virtual void SetHitRect (const CRect &rect, const UTILS::Color &color)
 
virtual void SetCamera (const CPoint &camera)
 
virtual void SetStereoFactor (const float &factor)
 
bool SetColorDiffuse (const KODI::GUILIB::GUIINFO::CGUIInfoColor &color)
 
CPoint GetRenderPosition () const
 
virtual float GetXPosition () const
 
virtual float GetYPosition () const
 
virtual float GetWidth () const
 
virtual float GetHeight () const
 
void MarkDirtyRegion (const unsigned int dirtyState=DIRTY_STATE_CONTROL)
 
bool IsControlDirty () const
 
const CRectGetRenderRegion () const
 return the render region in screen coordinates of this control More...
 
virtual CRect CalcRenderRegion () const
 calculate the render region in parentcontrol coordinates of this control Called during process to update m_renderRegion More...
 
void SetActions (const ActionMap &actions)
 
void SetAction (int actionID, const CGUIAction &action, bool replace=true)
 Set actions to perform on navigation Navigations are set if replace is true or if there is no previously set action. More...
 
CGUIAction GetAction (int actionID) const
 Get an action the control can be perform. More...
 
bool Navigate (int direction) const
 Start navigating in given direction. More...
 
virtual void SetFocus (bool focus)
 
virtual void SetWidth (float width)
 
virtual void SetHeight (float height)
 
virtual void SetVisible (bool bVisible, bool setVisState=false)
 
void SetVisibleCondition (const std::string &expression, const std::string &allowHiddenFocus="")
 
bool HasVisibleCondition () const
 
void SetEnableCondition (const std::string &expression)
 
virtual void UpdateVisibility (const CGUIListItem *item)
 
virtual void SetEnabled (bool bEnable)
 
virtual void SetInvalid ()
 
virtual void SetPulseOnSelect (bool pulse)
 
virtual std::string GetDescription () const
 
virtual std::string GetDescriptionByIndex (int index) const
 
void SetAnimations (const std::vector< CAnimation > &animations)
 
const std::vector< CAnimation > & GetAnimations () const
 
CAnimationGetAnimation (ANIMATION_TYPE type, bool checkConditions=true)
 
virtual void UpdateInfo (const CGUIListItem *item=NULL)
 
virtual void SetPushUpdates (bool pushUpdates)
 
virtual bool IsContainer () const
 
virtual bool GetCondition (int condition, int data) const
 
void SetParentControl (CGUIControl *control)
 
CGUIControlGetParentControl (void) const
 
void SetControlStats (GUICONTROLSTATS *controlStats)
 
GUICONTROLTYPES GetControlType () const
 
- Public Member Functions inherited from IBackgroundLoaderObserver
virtual ~IBackgroundLoaderObserver ()=default
 

Static Public Member Functions

static void GetResumeItemOffset (const CFileItem *item, int64_t &startoffset, int &partNumber)
 
static bool HasResumeItemOffset (const CFileItem *item)
 
static bool ShowResumeMenu (CFileItem &item)
 Show the resume menu for this item (if it has a resume bookmark) If a resume bookmark is found, we set the item's m_lStartOffset to STARTOFFSET_RESUME. Note that we do this in favour of setting the resume point, as we need additional information from the database (in particular, the playerState) when resuming some items (eg ISO/VIDEO_TS). More...
 
static void AppendAndClearSearchItems (CFileItemList &searchItems, const std::string &prependLabel, CFileItemList &results)
 Append a set of search items to a results list using a specific prepend label Sorts the search items first, then appends with the given prependLabel to the results list. Then empty the search item list so it can be refilled. More...
 
static void OnAssignContent (const std::string &path)
 Prompt the user for assigning content to a path. Based on changes, we then call OnUnassignContent, update or refresh scraper information in the database and optionally start a scan. More...
 
static std::string GetResumeString (const CFileItem &item)
 checks the database for a resume position and puts together a string More...
 

Protected Member Functions

void OnScan (const std::string &strPath, bool scanAll=false)
 
bool Update (const std::string &strDirectory, bool updateFilterPath=true) override
 Retrieves the items from the given path and updates the list. More...
 
bool GetDirectory (const std::string &strDirectory, CFileItemList &items) override
 Overwrite to fill fileitems from a source. More...
 
void OnItemLoaded (CFileItem *pItem) override
 
void GetGroupedItems (CFileItemList &items) override
 
bool CheckFilterAdvanced (CFileItemList &items) const override
 Check if the given list can be advance filtered or not. More...
 
bool CanContainFilter (const std::string &strDirectory) const override
 Check if the given path can contain a "filter" parameter. More...
 
void GetContextButtons (int itemNumber, CContextButtons &buttons) override
 
bool OnContextButton (int itemNumber, CONTEXT_BUTTON button) override
 
virtual void OnQueueItem (int iItem, bool first=false)
 
virtual void OnDeleteItem (CFileItemPtr pItem)
 
void OnDeleteItem (int iItem) override
 
virtual void DoSearch (const std::string &strSearch, CFileItemList &items)
 
std::string GetStartFolder (const std::string &dir) override
 Translate the folder to start in from the given quick path. More...
 
bool OnClick (int iItem, const std::string &player="") override
 On click. More...
 
bool OnSelect (int iItem) override
 
bool OnItemInfo (int item)
 react to an Info action on a view item More...
 
bool OnFileAction (int item, int action, std::string player)
 perform a given action on a file More...
 
void OnRestartItem (int iItem, const std::string &player="")
 
bool OnResumeItem (int iItem, const std::string &player="")
 
void PlayItem (int iItem, const std::string &player="")
 
bool OnPlayMedia (int iItem, const std::string &player="") override
 On media play. More...
 
bool OnPlayAndQueueMedia (const CFileItemPtr &item, std::string player="") override
 On play and media queue. More...
 
void LoadPlayList (const std::string &strPlayList, int iPlayList=PLAYLIST_VIDEO)
 
bool ShowIMDB (CFileItemPtr item, const ADDON::ScraperPtr &content, bool fromDB)
 
void AddItemToPlayList (const CFileItemPtr &pItem, CFileItemList &queuedItems)
 
void OnSearch ()
 Search the current directory for a string got from the virtual keyboard. More...
 
void OnSearchItemFound (const CFileItem *pSelItem)
 React on the selected search item. More...
 
int GetScraperForItem (CFileItem *item, ADDON::ScraperPtr &info, VIDEO::SScanSettings &settings)
 
bool OnPlayStackPart (int item)
 
virtual void LoadPlayList (const std::string &strFileName)
 
- Protected Member Functions inherited from CGUIMediaWindow
CGUIControlGetFirstFocusableControl (int id) override
 
bool Load (TiXmlElement *pRootElement) override
 Loads the window from the given XML element. More...
 
virtual void SetupShares ()
 
virtual bool GoParentFolder ()
 Go one directory up on list items. More...
 
virtual bool OnPopupMenu (int iItem)
 
virtual bool OnAddMediaSource ()
 
virtual void FormatItemLabels (CFileItemList &items, const LABEL_MASKS &labelMasks)
 Formats item labels. More...
 
virtual void UpdateButtons ()
 Updates the states. More...
 
void SaveControlStates () override
 
void RestoreControlStates () override
 
virtual bool Refresh (bool clearCache=false)
 Refreshes the current list by retrieving the lists's path. More...
 
virtual void FormatAndSort (CFileItemList &items)
 Format and sort file items. More...
 
virtual void OnPrepareFileItems (CFileItemList &items)
 On prepare file items. More...
 
virtual void OnCacheFileItems (CFileItemList &items)
 On cache file items. More...
 
void ClearFileItems ()
 
virtual void SortItems (CFileItemList &items)
 Sort file items. More...
 
virtual void UpdateFilterPath (const std::string &strDirector, const CFileItemList &items, bool updateFilterPath)
 
virtual bool Filter (bool advanced=true)
 
void OnFilterItems (const std::string &filter)
 
virtual bool GetFilteredItems (const std::string &filter, CFileItemList &items)
 
virtual bool GetAdvanceFilteredItems (CFileItemList &items)
 
virtual bool HaveDiscOrConnection (const std::string &strPath, int iDriveType)
 Check disc or connection present. More...
 
void ShowShareErrorMessage (CFileItem *pItem) const
 Shows a standard error message for a given pItem. More...
 
void SaveSelectedItemInHistory ()
 
void RestoreSelectedItemFromHistory ()
 
void GetDirectoryHistoryString (const CFileItem *pItem, std::string &strHistoryString) const
 Get history string for given file item. More...
 
void SetHistoryForPath (const std::string &strDirectory)
 Set history for path. More...
 
void UpdateFileList ()
 Update file list. More...
 
void OnRenameItem (int iItem)
 
bool WaitForNetwork () const
 
bool GetDirectoryItems (CURL &url, CFileItemList &items, bool useDir)
 
bool WaitGetDirectoryItems (CGetDirectoryItems &items)
 
void CancelUpdateItems ()
 
bool ProcessRenderLoop (bool renderOnly)
 
- Protected Member Functions inherited from CGUIWindow
EVENT_RESULT OnMouseEvent (const CPoint &point, const CMouseEvent &event) override
 Perform a mouse action. More...
 
virtual bool LoadXML (const std::string &strPath, const std::string &strLowerPath)
 Load the window XML from the given path. More...
 
virtual std::unique_ptr< TiXmlElement > Prepare (TiXmlElement *pRootElement)
 Prepare the XML for load. More...
 
bool NeedLoad () const
 Check if window needs a (re)load. The window need to be (re)loaded when window is not loaded or include conditions values were changed. More...
 
virtual void SetDefaults ()
 
void Close_Internal (bool forceClose=false, int nextWindowID=0, bool enableSound=true)
 
EVENT_RESULT OnMouseAction (const CAction &action)
 
bool Animate (unsigned int currentTime) override
 
bool CheckAnimation (ANIMATION_TYPE animType) override
 
void OnEditChanged (int id, std::string &text)
 
bool SendMessage (int message, int id, int param1=0, int param2=0)
 
void LoadControl (TiXmlElement *pControl, CGUIControlGroup *pGroup, const CRect &rect)
 
CPoint GetPosition () const override
 Grabs the window's top,left position in skin coordinates The window origin may change based on <origin> tag conditions in the skin. More...
 
- Protected Member Functions inherited from CGUIControlLookup
bool IsValidControl (const CGUIControl *control) const
 Check whether a given control is valid Runs through controls and returns whether this control is valid. Only functional for controls with non-zero id. More...
 
std::pair< LookupMap::const_iterator, LookupMap::const_iterator > GetLookupControls (int controlId) const
 
void AddLookup (CGUIControl *control)
 
void RemoveLookup (CGUIControl *control)
 
void RemoveLookup ()
 
const LookupMapGetLookup () const
 
void ClearLookup ()
 
- Protected Member Functions inherited from CGUIControl
virtual bool OnMouseOver (const CPoint &point)
 Called when the mouse is over the control. Default implementation selects the control. More...
 
virtual bool CanFocusFromPoint (const CPoint &point) const
 Test whether we can focus a control from a point on screen. More...
 
virtual bool UpdateColors ()
 
void UpdateStates (ANIMATION_TYPE type, ANIMATION_PROCESS currentProcess, ANIMATION_STATE currentState)
 
bool SendWindowMessage (CGUIMessage &message) const
 
- Protected Member Functions inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
 CountingLockable ()=default
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 
unsigned int exit (unsigned int leave=0)
 
void restore (unsigned int restoreCount)
 
XbmcThreads::CRecursiveMutex & get_underlying ()
 

Static Protected Member Functions

static bool OnUnAssignContent (const std::string &path, int header, int text)
 
static bool StackingAvailable (const CFileItemList &items)
 
- Static Protected Member Functions inherited from CGUIMediaWindow
static std::string RemoveParameterFromPath (const std::string &strDirectory, const std::string &strParameter)
 Utility method to remove the given parameter from a path/URL. More...
 

Protected Attributes

CGUIDialogProgressm_dlgProgress
 
CVideoDatabase m_database
 
CVideoThumbLoader m_thumbLoader
 
bool m_stackingAvailable
 
- Protected Attributes inherited from CGUIMediaWindow
XFILE::CVirtualDirectory m_rootDir
 
CGUIViewControl m_viewControl
 
CFileItemListm_vecItems
 
CFileItemListm_unfilteredItems
 items prior to filtering using FilterItems() More...
 
CDirectoryHistory m_history
 
std::unique_ptr< CGUIViewStatem_guiState
 
std::atomic_bool m_vecItemsUpdating = {false}
 
CEvent m_updateEvent
 
std::atomic_bool m_updateAborted = {false}
 
std::atomic_bool m_updateJobActive = {false}
 
int m_iLastControl
 
std::string m_startDirectory
 
CSmartPlaylist m_filter
 
bool m_canFilterAdvanced
 
std::string m_strFilterPath
 Contains the path used for filtering (including any active filter) More...
 
bool m_backgroundLoad = false
 
- Protected Attributes inherited from CGUIWindow
std::vector< int > m_idRange
 
RESOLUTION_INFO m_coordsRes
 
bool m_needsScaling
 
bool m_windowLoaded
 
LOAD_TYPE m_loadType
 
bool m_dynamicResourceAlloc
 
bool m_closing
 
bool m_active
 
KODI::GUILIB::GUIINFO::CGUIInfoColor m_clearBackground
 
int m_renderOrder
 
std::vector< COriginm_origins
 
int m_lastControlID
 
std::vector< CControlStatem_controlStates
 
int m_previousWindow
 
bool m_animationsEnabled
 
CGUIAction m_loadActions
 
CGUIAction m_unloadActions
 
TiXmlElement * m_windowXMLRootElement
 
bool m_manualRunActions
 
int m_exclusiveMouseControl
 id of child control that wishes to receive all mouse events More...
 
int m_menuControlID
 
int m_menuLastFocusedControlID
 
bool m_custom
 
- Protected Attributes inherited from CGUIControlGroup
std::vector< CGUIControl * > m_children
 
int m_defaultControl
 
bool m_defaultAlways
 
int m_focusedControl
 
bool m_renderFocusedLast
 
- Protected Attributes inherited from CGUIControl
ActionMap m_actions
 
float m_posX
 
float m_posY
 
float m_height
 
float m_width
 
CRect m_hitRect
 
UTILS::Color m_hitColor = 0xffffffff
 
KODI::GUILIB::GUIINFO::CGUIInfoColor m_diffuseColor
 
int m_controlID
 
int m_parentID
 
bool m_bHasFocus
 
bool m_bInvalidated
 
bool m_bAllocated
 
bool m_pulseOnSelect
 
GUICONTROLTYPES ControlType
 
GUICONTROLSTATSm_controlStats
 
CGUIControlm_parentControl
 
INFO::InfoPtr m_visibleCondition
 
GUIVISIBLE m_visible
 
bool m_visibleFromSkinCondition
 
bool m_forceHidden
 
KODI::GUILIB::GUIINFO::CGUIInfoBool m_allowHiddenFocus
 
bool m_hasProcessed
 
INFO::InfoPtr m_enableCondition
 
bool m_enabled
 
bool m_pushedUpdates
 
std::vector< CAnimationm_animations
 
CPoint m_camera
 
bool m_hasCamera
 
float m_stereo
 
TransformMatrix m_transform
 
TransformMatrix m_cachedTransform
 
unsigned int m_controlDirtyState
 
CRect m_renderRegion
 
- Protected Attributes inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
XbmcThreads::CRecursiveMutex mutex
 
unsigned int count
 

Additional Inherited Members

- Public Types inherited from CGUIWindow
enum  LOAD_TYPE { LOAD_EVERY_TIME , LOAD_ON_GUI_INIT , KEEP_IN_MEMORY }
 
- Public Types inherited from CGUIControl
enum  GUICONTROLTYPES {
  GUICONTROL_UNKNOWN , GUICONTROL_BUTTON , GUICONTROL_FADELABEL , GUICONTROL_IMAGE ,
  GUICONTROL_BORDEREDIMAGE , GUICONTROL_LABEL , GUICONTROL_LISTGROUP , GUICONTROL_PROGRESS ,
  GUICONTROL_RADIO , GUICONTROL_RSS , GUICONTROL_SLIDER , GUICONTROL_SETTINGS_SLIDER ,
  GUICONTROL_SPIN , GUICONTROL_SPINEX , GUICONTROL_TEXTBOX , GUICONTROL_TOGGLEBUTTON ,
  GUICONTROL_VIDEO , GUICONTROL_GAME , GUICONTROL_MOVER , GUICONTROL_RESIZE ,
  GUICONTROL_EDIT , GUICONTROL_VISUALISATION , GUICONTROL_RENDERADDON , GUICONTROL_MULTI_IMAGE ,
  GUICONTROL_GROUP , GUICONTROL_GROUPLIST , GUICONTROL_SCROLLBAR , GUICONTROL_LISTLABEL ,
  GUICONTROL_GAMECONTROLLER , GUICONTAINER_LIST , GUICONTAINER_WRAPLIST , GUICONTAINER_FIXEDLIST ,
  GUICONTAINER_EPGGRID , GUICONTAINER_PANEL
}
 
enum  GUIVISIBLE { HIDDEN = 0 , DELAYED , VISIBLE }
 
enum  GUISCROLLVALUE { FOCUS = 0 , NEVER , ALWAYS }
 
typedef std::map< int, CGUIActionActionMap
 Set actions to perform on navigation. More...
 
- Protected Types inherited from CGUIControlGroup
typedef std::vector< CGUIControl * >::iterator iControls
 
typedef std::vector< CGUIControl * >::const_iterator ciControls
 
typedef std::vector< CGUIControl * >::reverse_iterator rControls
 
typedef std::vector< CGUIControl * >::const_reverse_iterator crControls
 
- Protected Types inherited from CGUIControlLookup
typedef std::multimap< int, CGUIControl * > LookupMap
 
- Static Protected Attributes inherited from CGUIControl
static const unsigned int DIRTY_STATE_CONTROL = 1
 
static const unsigned int DIRTY_STATE_CHILD = 2
 

Constructor & Destructor Documentation

◆ CGUIWindowVideoBase()

CGUIWindowVideoBase::CGUIWindowVideoBase ( int  id,
const std::string &  xmlFile 
)

◆ ~CGUIWindowVideoBase()

CGUIWindowVideoBase::~CGUIWindowVideoBase ( void  )
overridedefault

Member Function Documentation

◆ AddItemToPlayList()

void CGUIWindowVideoBase::AddItemToPlayList ( const CFileItemPtr pItem,
CFileItemList queuedItems 
)
protected

◆ AddToDatabase()

void CGUIWindowVideoBase::AddToDatabase ( int  iItem)

◆ AppendAndClearSearchItems()

void CGUIWindowVideoBase::AppendAndClearSearchItems ( CFileItemList searchItems,
const std::string &  prependLabel,
CFileItemList results 
)
static

Append a set of search items to a results list using a specific prepend label Sorts the search items first, then appends with the given prependLabel to the results list. Then empty the search item list so it can be refilled.

Parameters
searchItemsThe search items to append.
prependLabelthe label that should be prepended to all search results.
resultsthe fileitemlist to append the search results to.
See also
DoSearch

◆ CanContainFilter()

bool CGUIWindowVideoBase::CanContainFilter ( const std::string &  strDirectory) const
overrideprotectedvirtual

Check if the given path can contain a "filter" parameter.

Parameters
strDirectoryPath to check
Returns
true if the given path can contain a "filter" parameter otherwise false

Reimplemented from CGUIMediaWindow.

◆ CheckFilterAdvanced()

bool CGUIWindowVideoBase::CheckFilterAdvanced ( CFileItemList items) const
overrideprotectedvirtual

Check if the given list can be advance filtered or not.

Parameters
itemsList of items to check
Returns
true if the list can be advance filtered otherwise false

Reimplemented from CGUIMediaWindow.

◆ DoSearch()

virtual void CGUIWindowVideoBase::DoSearch ( const std::string &  strSearch,
CFileItemList items 
)
inlineprotectedvirtual

Reimplemented in CGUIWindowVideoNav.

◆ GetContextButtons()

void CGUIWindowVideoBase::GetContextButtons ( int  itemNumber,
CContextButtons buttons 
)
overrideprotectedvirtual

Reimplemented from CGUIMediaWindow.

Reimplemented in CGUIWindowVideoNav, and CGUIWindowVideoPlaylist.

◆ GetDirectory()

bool CGUIWindowVideoBase::GetDirectory ( const std::string &  strDirectory,
CFileItemList items 
)
overrideprotectedvirtual

Overwrite to fill fileitems from a source.

Parameters
[in]strDirectoryPath to read
[out]itemsFill with items specified in strDirectory
Returns
false if given directory not present
Todo:
Do we want to limit the directories we apply the video ones to?

Reimplemented from CGUIMediaWindow.

Reimplemented in CGUIWindowVideoNav.

◆ GetGroupedItems()

void CGUIWindowVideoBase::GetGroupedItems ( CFileItemList items)
overrideprotectedvirtual

Reimplemented from CGUIMediaWindow.

◆ GetResumeItemOffset()

void CGUIWindowVideoBase::GetResumeItemOffset ( const CFileItem item,
int64_t &  startoffset,
int &  partNumber 
)
static

◆ GetResumeString()

std::string CGUIWindowVideoBase::GetResumeString ( const CFileItem item)
static

checks the database for a resume position and puts together a string

Parameters
itemselected item
Returns
string containing the resume position or an empty string if there is no resume position

◆ GetScraperForItem()

int CGUIWindowVideoBase::GetScraperForItem ( CFileItem item,
ADDON::ScraperPtr info,
VIDEO::SScanSettings settings 
)
protected

◆ GetStartFolder()

std::string CGUIWindowVideoBase::GetStartFolder ( const std::string &  url)
overrideprotectedvirtual

Translate the folder to start in from the given quick path.

Parameters
urlthe folder the user wants
Returns
the resulting path

Reimplemented from CGUIMediaWindow.

Reimplemented in CGUIWindowVideoNav.

◆ HasResumeItemOffset()

bool CGUIWindowVideoBase::HasResumeItemOffset ( const CFileItem item)
static

◆ LoadPlayList() [1/2]

virtual void CGUIMediaWindow::LoadPlayList ( const std::string &  strFileName)
inlineprotectedvirtual

Reimplemented from CGUIMediaWindow.

◆ LoadPlayList() [2/2]

void CGUIWindowVideoBase::LoadPlayList ( const std::string &  strPlayList,
int  iPlayList = PLAYLIST_VIDEO 
)
protected

◆ OnAction()

bool CGUIWindowVideoBase::OnAction ( const CAction action)
overridevirtual

Reimplemented from CGUIWindow.

Reimplemented in CGUIWindowVideoNav, and CGUIWindowVideoPlaylist.

◆ OnAssignContent()

void CGUIWindowVideoBase::OnAssignContent ( const std::string &  path)
static

Prompt the user for assigning content to a path. Based on changes, we then call OnUnassignContent, update or refresh scraper information in the database and optionally start a scan.

Parameters
paththe path to assign content for

◆ OnClick()

bool CGUIWindowVideoBase::OnClick ( int  iItem,
const std::string &  player = "" 
)
overrideprotectedvirtual

On click.

With this function you can react on a users click in the list/thumb panel. It returns true, if the click is handled. This function calls OnPlayMedia()

Reimplemented from CGUIMediaWindow.

Reimplemented in CGUIWindowVideoNav.

◆ OnContextButton()

bool CGUIWindowVideoBase::OnContextButton ( int  itemNumber,
CONTEXT_BUTTON  button 
)
overrideprotectedvirtual

Reimplemented from CGUIMediaWindow.

Reimplemented in CGUIWindowVideoNav, and CGUIWindowVideoPlaylist.

◆ OnDeleteItem() [1/2]

void CGUIWindowVideoBase::OnDeleteItem ( CFileItemPtr  pItem)
protectedvirtual

Reimplemented in CGUIWindowVideoNav.

◆ OnDeleteItem() [2/2]

void CGUIWindowVideoBase::OnDeleteItem ( int  iItem)
overrideprotectedvirtual

Reimplemented from CGUIMediaWindow.

◆ OnFileAction()

bool CGUIWindowVideoBase::OnFileAction ( int  item,
int  action,
std::string  player 
)
protected

perform a given action on a file

Parameters
itemthe selected item
actionthe action to perform
Returns
true if the action is performed, false otherwise

◆ OnItemInfo() [1/2]

void CGUIWindowVideoBase::OnItemInfo ( const CFileItem fileItem,
ADDON::ScraperPtr scraper 
)
virtual

Reimplemented in CGUIWindowVideoNav.

◆ OnItemInfo() [2/2]

bool CGUIWindowVideoBase::OnItemInfo ( int  item)
protected

react to an Info action on a view item

Parameters
itemthe selected item
Returns
true if the action is performed, false otherwise

◆ OnItemLoaded()

void CGUIWindowVideoBase::OnItemLoaded ( CFileItem pItem)
inlineoverrideprotectedvirtual

Implements IBackgroundLoaderObserver.

Reimplemented in CGUIWindowVideoNav.

◆ OnMessage()

bool CGUIWindowVideoBase::OnMessage ( CGUIMessage message)
overridevirtual

Reimplemented from CGUIWindow.

Reimplemented in CGUIWindowVideoNav, and CGUIWindowVideoPlaylist.

◆ OnPlayAndQueueMedia()

bool CGUIWindowVideoBase::OnPlayAndQueueMedia ( const CFileItemPtr item,
std::string  player = "" 
)
overrideprotectedvirtual

On play and media queue.

Note
Override if you want to change the default behavior of what is done when the user clicks on a file in a "folder" with similar files.

This function is called by OnClick()

Reimplemented from CGUIMediaWindow.

◆ OnPlayMedia()

bool CGUIWindowVideoBase::OnPlayMedia ( int  iItem,
const std::string &  player = "" 
)
overrideprotectedvirtual

On media play.

Note
Override if you want to change the default behavior, what is done when the user clicks on a file.

This function is called by OnClick()

Reimplemented from CGUIMediaWindow.

Reimplemented in CGUIWindowVideoPlaylist.

◆ OnPlayStackPart()

bool CGUIWindowVideoBase::OnPlayStackPart ( int  item)
protected

◆ OnQueueItem()

void CGUIWindowVideoBase::OnQueueItem ( int  iItem,
bool  first = false 
)
protectedvirtual

◆ OnRestartItem()

void CGUIWindowVideoBase::OnRestartItem ( int  iItem,
const std::string &  player = "" 
)
protected

◆ OnResumeItem()

bool CGUIWindowVideoBase::OnResumeItem ( int  iItem,
const std::string &  player = "" 
)
protected

◆ OnScan()

void CGUIWindowVideoBase::OnScan ( const std::string &  strPath,
bool  scanAll = false 
)
protected

◆ OnSearch()

void CGUIWindowVideoBase::OnSearch ( )
protected

Search the current directory for a string got from the virtual keyboard.

◆ OnSearchItemFound()

void CGUIWindowVideoBase::OnSearchItemFound ( const CFileItem pSelItem)
protected

React on the selected search item.

Parameters
pItemSearch result item

◆ OnSelect()

bool CGUIWindowVideoBase::OnSelect ( int  iItem)
overrideprotectedvirtual

Reimplemented from CGUIMediaWindow.

◆ OnUnAssignContent()

bool CGUIWindowVideoBase::OnUnAssignContent ( const std::string &  path,
int  header,
int  text 
)
staticprotected

◆ PlayItem()

void CGUIWindowVideoBase::PlayItem ( int  iItem,
const std::string &  player = "" 
)
protected

◆ PlayMovie()

void CGUIWindowVideoBase::PlayMovie ( const CFileItem item,
const std::string &  player = "" 
)

◆ ShowIMDB()

bool CGUIWindowVideoBase::ShowIMDB ( CFileItemPtr  item,
const ADDON::ScraperPtr content,
bool  fromDB 
)
protected

◆ ShowResumeMenu()

bool CGUIWindowVideoBase::ShowResumeMenu ( CFileItem item)
static

Show the resume menu for this item (if it has a resume bookmark) If a resume bookmark is found, we set the item's m_lStartOffset to STARTOFFSET_RESUME. Note that we do this in favour of setting the resume point, as we need additional information from the database (in particular, the playerState) when resuming some items (eg ISO/VIDEO_TS).

Parameters
itemitem to check for a resume bookmark
Returns
true if an option was chosen, false if the resume menu was cancelled.

◆ StackingAvailable()

bool CGUIWindowVideoBase::StackingAvailable ( const CFileItemList items)
staticprotected

◆ Update()

bool CGUIWindowVideoBase::Update ( const std::string &  strDirectory,
bool  updateFilterPath = true 
)
overrideprotectedvirtual

Retrieves the items from the given path and updates the list.

Parameters
strDirectoryThe path to the directory to get the items from
updateFilterPathWhether to update the filter path in m_strFilterPath or not
Returns
true if the list was successfully updated otherwise false
See also
GetDirectory
m_vecItems
m_strFilterPath
Todo:
OnInitWindow calls Update() before window path has been set properly.

Reimplemented from CGUIMediaWindow.

Reimplemented in CGUIWindowVideoNav.

Member Data Documentation

◆ m_database

CVideoDatabase CGUIWindowVideoBase::m_database
protected

◆ m_dlgProgress

CGUIDialogProgress* CGUIWindowVideoBase::m_dlgProgress
protected

◆ m_stackingAvailable

bool CGUIWindowVideoBase::m_stackingAvailable
protected

◆ m_thumbLoader

CVideoThumbLoader CGUIWindowVideoBase::m_thumbLoader
protected

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