Pyro higlevel API
Classes | Public Types | Public Member Functions | List of all members
os::IconView Class Reference

Icon view with different views. More...

Inheritance diagram for os::IconView:
os::Control os::View os::Invoker os::Handler os::IconDirectoryView

Classes

class  MainView
 
class  Private
 

Public Types

enum  scroll_direction {
  SCROLL_UP,
  SCROLL_DOWN,
  SCROLL_LEFT,
  SCROLL_RIGHT
}
 
enum  view_type {
  VIEW_ICONS,
  VIEW_LIST,
  VIEW_DETAILS,
  VIEW_ICONS_DESKTOP
}
 The different view types. More...
 

Public Member Functions

 IconView (const Rect &cFrame, os::String zName, uint32 nResizeMask)
 Constructor. More...
 
 ~IconView ()
 
virtual void EnableStatusChanged (bool bIsEnabled)
 
virtual void Invoked (uint nIcon, os::IconData *pcData)
 Called when an icon is invoked. More...
 
virtual void SelectionChanged ()
 Called when the selection changes. More...
 
virtual void DragSelection (os::Point cStartPoint)
 Called when an icon should be dragged. More...
 
virtual void OpenContextMenu (os::Point cPosition, bool bMouseOverIcon)
 Called when the context menu of one icon should be opened. More...
 
view_type GetView () const
 Returns the curent view type. More...
 
void SetView (view_type eType)
 Sets a new view type. More...
 
void SetTextColor (os::Color32_s sColor)
 Sets a new text color. More...
 
void SetTextShadowColor (os::Color32_s sColor)
 Sets a new color for the shadows of the text. More...
 
void SetSelectionColor (os::Color32_s sColor)
 Sets a new color for the selection. More...
 
void SetBackgroundColor (os::Color32_s sColor)
 Sets a new background color. More...
 
void SetBackground (os::Image *pcImage)
 Sets a new background image. More...
 
void SetSingleClick (bool bSingle)
 Enables/Disables single click mode. More...
 
bool IsSingleClick () const
 Returns whether single click mode is enabled. More...
 
void SetAutoSort (bool bAutoSort)
 Enables/Disables sorting. More...
 
bool IsAutoSort () const
 Returns whether sorting is enabled. More...
 
void SetMultiSelect (bool bMultiSelect)
 Enables/Disables multiselect. More...
 
bool IsMultiSelect () const
 Returns whether multiselect is enabled. More...
 
void Clear ()
 Clears the iconview. More...
 
uint AddIcon (os::Image *pcIcon, os::IconData *pcData)
 Adds a new icon to the iconview. More...
 
void RemoveIcon (uint nIcon)
 Removes an icon. More...
 
uint GetIconCount ()
 Returns the number of icons. More...
 
os::String GetIconString (uint nIcon, uint nString)
 Returns a string of an icon. More...
 
os::ImageGetIconImage (uint nIcon)
 Returns the image of an icon. More...
 
os::IconDataGetIconData (uint nIcon)
 Returns the private data of an icon. More...
 
bool GetIconSelected (uint nIcon)
 Returns whether one icon is selected. More...
 
os::Point GetIconPosition (uint nIcon)
 Returns the current position of an icon. More...
 
void AddIconString (uint nIcon, os::String zName)
 Adds a string of an icon. More...
 
void SetIconString (uint nIcon, uint nString, os::String zString)
 Sets a string of an icon. More...
 
void SetIconImage (uint nIcon, os::Image *pcImage)
 Sets the image of an icon. More...
 
void SetIconSelected (uint nIcon, bool bSelected, bool bDeselectAll=true)
 Sets the selection status of an icon. More...
 
void SetIconPosition (uint nIcon, os::Point cPosition)
 Sets the position of an icon. More...
 
os::Point GetIconSize ()
 Returns the current icon size that is assumed by the iconview. More...
 
void RenderIcon (uint nIcon, os::View *pcView, os::Point cPosition)
 Renders an icon in a view. More...
 
void RenderIcon (os::String zName, os::Image *pcImage, os::View *pcView, os::Point cPosition)
 Renders an icon in a view. More...
 
void Layout ()
 Relayouts the view. More...
 
os::Point ConvertToView (os::Point cPoint)
 
void StartScroll (scroll_direction eDirection)
 Start scrolling. More...
 
void StopScroll ()
 Stops scrolling. More...
 
void ScrollToIcon (uint nIcon)
 Scrolls to an icon. More...
 
void SetSelChangeMsg (os::Message *pcMessage)
 Sets the selection change message. More...
 
void SetInvokeMsg (os::Message *pcMessage)
 Sets the invoke message. More...
 
virtual os::MessageGetSelChangeMsg ()
 Returns the selection change message. More...
 
virtual os::MessageGetInvokeMsg ()
 Returns the invoke message. More...
 
virtual void MakeFocus (bool bFocus=true)
 Change focus of the IconView. More...
 
virtual void SetTabOrder (int nOrder=NEXT_TAB_ORDER)
 Set the keyboard manouvering sorting order. More...
 
virtual int GetTabOrder () const
 Get the keybord manouvering order. More...
 
virtual int GetTabOrder ()
 
- Public Member Functions inherited from os::Control
 Control (const Rect &cFrame, const String &cName, const String &cLabel, Message *pcMessage, uint32 nResizeMask, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND)
 
 ~Control ()
 
virtual void AttachedToWindow (void)
 
virtual void DetachedFromWindow (void)
 
virtual bool PreValueChange (Variant *pcNewValue)
 
virtual void PostValueChange (const Variant &cNewValue)
 
virtual void LabelChanged (const String &cNewLabel)
 
virtual bool Invoked (Message *pcMessage)
 Intercept outgoing messages. More...
 
virtual void SetEnable (bool bEnabled)
 
virtual bool IsEnabled (void) const
 
virtual void SetLabel (const String &cLabel)
 
virtual String GetLabel (void) const
 
virtual void SetValue (Variant cValue, bool bInvoke=true)
 
virtual Variant GetValue () const
 
virtual void __CTRL_reserved1__ ()
 
virtual void __CTRL_reserved2__ ()
 
virtual void __CTRL_reserved3__ ()
 
virtual void __CTRL_reserved4__ ()
 
virtual void __CTRL_reserved5__ ()
 
- Public Member Functions inherited from os::View
 View (const Rect &cFrame, const String &cTitle, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND)
 View constructor. More...
 
virtual ~View ()
 View destructor. More...
 
virtual void AllAttached ()
 
virtual void AllDetached ()
 
virtual void Activated (bool bIsActive)
 Hook called when the view gain or loose focus. More...
 
virtual void WindowActivated (bool bIsActive)
 Hook called when the window hosting this view gain or loose focus. More...
 
virtual void Paint (const Rect &cUpdateRect)
 Called by the system update "damaged" areas of the view. More...
 
virtual void MouseMove (const Point &cNewPos, int nCode, uint32 nButtons, Message *pcData)
 Hook called by the system when the mouse is moved. More...
 
virtual void MouseDown (const Point &cPosition, uint32 nButtons)
 Hook called by the system when a mouse button is pressed. More...
 
virtual void MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData)
 Hook called by the system when a mouse button is release. More...
 
virtual void KeyDown (const char *pzString, const char *pzRawString, uint32 nQualifiers)
 Hook called by the system when a key is pressed while the view has focus. More...
 
virtual void KeyUp (const char *pzString, const char *pzRawString, uint32 nQualifiers)
 Hook called by the system when a key is released while the view has focus. More...
 
virtual void FrameMoved (const Point &cDelta)
 Virtual hook called by the system when the view is moved within it's parent. More...
 
virtual void FrameSized (const Point &cDelta)
 Virtual hook called by the system when the view is resized. More...
 
virtual void ViewScrolled (const Point &cDelta)
 Virtual hook called by the system when the view content is scrolled. More...
 
virtual void FontChanged (Font *pcNewFont)
 Called to notify the view that the font has changed. More...
 
virtual Point GetPreferredSize (bool bLargest) const
 
virtual Point GetContentSize () const
 
virtual void WheelMoved (const Point &cDelta)
 Hook called by the system when the scroll-wheel is rotated. More...
 
virtual void AddChild (View *pcView, bool bAssignTabOrder=false)
 
void RemoveChild (View *pcChild)
 
void RemoveThis ()
 
ViewGetChildAt (const Point &cPos) const
 
ViewGetChildAt (int nIndex) const
 
ViewGetParent () const
 
ScrollBarGetVScrollBar () const
 
ScrollBarGetHScrollBar () const
 
WindowGetWindow () const
 
String GetTitle () const
 
virtual const ShortcutKeyGetShortcut () const
 
virtual void SetShortcut (const ShortcutKey &cShortcut)
 Set keyboard shortcut. More...
 
virtual void SetShortcutFromLabel (const String &cLabel)
 Set keyboard shortcut from Label. More...
 
void SetContextMenu (Menu *pcMenu)
 Set popup menu for a View. More...
 
MenuGetContextMenu () const
 Get popup menu. More...
 
uint32 GetQualifiers () const
 
void GetMouse (Point *pcPosition, uint32 *pnButtons) const
 
void SetMousePos (const Point &cPosition)
 
void BeginDrag (Message *pcData, const Point &cOffset, const Bitmap *pcBitmap, Handler *pcReplyTarget=NULL)
 Start a drag and drop operation. More...
 
void BeginDrag (Message *pcData, const Point &cOffset, const Rect &cBounds, Handler *pcReplyTarget=NULL)
 Start a drag and drop operation. More...
 
void SetFlags (uint32 nFlags)
 
uint32 GetFlags (uint32 nMask=~0L) const
 
void SetResizeMask (uint32 nFlags)
 
uint32 GetResizeMask () const
 
void Show (bool bVisible=true)
 Show/hide a view and all it's children. More...
 
void Hide ()
 
bool IsVisible () const
 
virtual bool HasFocus () const
 
Rect GetFrame () const
 
Rect GetBounds () const
 
Rect GetNormalizedBounds () const
 
float Width () const
 
float Height () const
 
Point GetLeftTop () const
 
virtual void SetFrame (const Rect &cRect, bool bNotifyServer=true)
 Set the size and position relative to the parent view. More...
 
virtual void MoveBy (const Point &cDelta)
 Move the view within the parent coordinate system. More...
 
virtual void MoveBy (float vDeltaX, float vDeltaY)
 
virtual void MoveTo (const Point &cPos)
 Set the views position within the parent coordinate system. More...
 
virtual void MoveTo (float x, float y)
 
virtual void ResizeBy (const Point &cDelta)
 
virtual void ResizeBy (float vDeltaW, float vDeltaH)
 
virtual void ResizeTo (const Point &cSize)
 Set a new absolute size for the view. More...
 
virtual void ResizeTo (float W, float H)
 Set a new absolute size for the view. More...
 
void SetDrawingRegion (const Region &cReg)
 Restrict rendering using a clipping region. More...
 
void ClearDrawingRegion ()
 Remove any previously assigned drawing region. More...
 
void SetShapeRegion (const Region &cReg)
 Define a non-square shape for the view. More...
 
void ClearShapeRegion ()
 Remove any previously assigned shape region. More...
 
virtual int ToggleDepth ()
 
Point ConvertFromParent (const Point &cPoint) const
 
void ConvertFromParent (Point *cPoint) const
 
Rect ConvertFromParent (const Rect &cRect) const
 
void ConvertFromParent (Rect *cRect) const
 
Point ConvertToWindow (const Point &cPoint) const
 
void ConvertToWindow (Point *cPoint) const
 
Rect ConvertToWindow (const Rect &cRect) const
 
void ConvertToWindow (Rect *cRect) const
 
Point ConvertFromWindow (const Point &cPoint) const
 
void ConvertFromWindow (Point *cPoint) const
 
Rect ConvertFromWindow (const Rect &cRect) const
 
void ConvertFromWindow (Rect *cRect) const
 
Point ConvertToScreen (const Point &cPoint) const
 
void ConvertToScreen (Point *cPoint) const
 
Rect ConvertToScreen (const Rect &cRect) const
 
void ConvertToScreen (Rect *cRect) const
 
Point ConvertFromScreen (const Point &cPoint) const
 
void ConvertFromScreen (Point *cPoint) const
 
Rect ConvertFromScreen (const Rect &cRect) const
 
void ConvertFromScreen (Rect *cRect) const
 
void Invalidate (const Rect &cRect, bool bRecurse=false)
 Add a rectangle to the damage list. More...
 
void Invalidate (bool bRecurse=false)
 Invalidate the whole view. More...
 
void Flush ()
 Flush the render queue. More...
 
void Sync ()
 Flush the render queue. More...
 
void SetDrawingMode (drawing_mode nMode)
 
drawing_mode GetDrawingMode () const
 
void SetFont (Font *pcFont)
 Change the views text font. More...
 
FontGetFont () const
 
void SetFgColor (int nRed, int nGreen, int nBlue, int nAlpha=255)
 
void SetFgColor (Color32_s sColor)
 
Color32_s GetFgColor () const
 
void SetBgColor (int nRed, int nGreen, int nBlue, int nAlpha=255)
 
void SetBgColor (Color32_s sColor)
 
Color32_s GetBgColor () const
 
void SetEraseColor (int nRed, int nGreen, int nBlue, int nAlpha=255)
 
void SetEraseColor (Color32_s sColor)
 
Color32_s GetEraseColor () const
 
void MovePenTo (const Point &cPos)
 
void MovePenTo (float x, float y)
 
void MovePenBy (const Point &cPos)
 
void MovePenBy (float x, float y)
 
Point GetPenPosition () const
 Get the current pen position. More...
 
void DrawLine (const Point &cToPoint)
 
void DrawLine (const Point &cFromPnt, const Point &cToPnt)
 
virtual void ScrollBy (const Point &cDelta)
 
virtual void ScrollBy (float vDeltaX, float vDeltaY)
 
virtual void ScrollTo (Point cTopLeft)
 
virtual void ScrollTo (float x, float y)
 
Point GetScrollOffset () const
 
void ScrollRect (const Rect &cSrcRect, const Rect &cDstRect)
 Copy a rectangle from one location to another within the view. More...
 
void FillRect (const Rect &cRect)
 
void FillRect (const Rect &cRect, Color32_s sColor)
 
void DrawBitmap (const Bitmap *pcBitmap, const Rect &cSrcRect, const Rect &cDstRect)
 Render a bitmap into the view. More...
 
void EraseRect (const Rect &cRect)
 
void DrawFrame (const Rect &cRect, uint32 nFlags)
 
void DrawRoundedFrame (const os::Rect &cReizeFrame=os::Rect(1, 4,-1,-4), const os::Color32_s &cColor=get_default_color(COL_SHADOW))
 
void DrawRoundedFrame (const os::Rect &cFrame, const os::Rect &cReizeFrame=os::Rect(1, 4,-1,-4), const os::Color32_s &cColor=get_default_color(COL_SHADOW))
 
void DrawString (const Point &cPos, const String &cString)
 
void DrawString (const String &cString)
 Render a text-string at the current pen position. More...
 
void DrawString (const char *pzStr, int Len=-1)
 
void DrawText (const Rect &cPos, const String &cString, uint32 nFlags=0)
 Render a text-string in a specified rectangle. More...
 
void DrawSelectedText (const Rect &cPos, const String &cString, const IPoint &cSel1, const IPoint &cSel2, uint32 nMode=SEL_CHAR, uint32 nFlags=0)
 
void GetSelection (const String &cClipboard="__system_clipboard__")
 
void GetTruncatedStrings (const char **pazStringArray, int nStringCount, uint32 nMode, float nWidth, char **pazResultArray) const
 
float GetStringWidth (const String &cString) const
 
float GetStringWidth (const char *pzString, int nLen=-1) const
 
void GetStringWidths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float *avWidthArray) const
 
Point GetTextExtent (const String &cString, uint32 nFlags=0, int nTargetWidth=-1) const
 
int GetStringLength (const String &cString, float vWidth, bool bIncludeLast=false) const
 
int GetStringLength (const char *pzString, int nLen, float vWidth, bool bIncludeLast=false) const
 
void GetStringLengths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float vWidth, int *anMaxLengthArray, bool bIncludeLast=false) const
 
void GetFontHeight (font_height *psHeight) const
 
void Ping (int nSize=0) const
 
void SetToolTip (const os::String &t)
 
os::String GetToolTip () const
 
Point ConvertToParent (const Point &cPoint) const
 Translate a os::Point into our parents coordinate system. More...
 
void ConvertToParent (Point *cPoint) const
 Translate a os::Point into our parents coordinate system. More...
 
Rect ConvertToParent (const Rect &cRect) const
 
void ConvertToParent (Rect *cRect) const
 
- Public Member Functions inherited from os::Handler
 Handler (const String &cName)
 Construct a handler. More...
 
virtual ~Handler ()
 Destructor. More...
 
virtual void TimerTick (int nID)
 Timer dispatch member. More...
 
virtual void HandleMessage (Message *pcMessage)
 Handle a message targeted at this handler. More...
 
String GetName () const
 Get the handlers name. More...
 
void SetName (const String &cName)
 Rename the handler. More...
 
LooperGetLooper () const
 Get a pointer to the looper this handler belongs to. More...
 
void SetNextHandler (Handler *pcNextHandler)
 Set a handler that should handle messages this handler is not interrested in. More...
 
HandlerGetNextHandler () const
 Get the next handler in a handler chain. More...
 
void AddFilter (MessageFilter *pcFilter)
 
void RemoveFilter (MessageFilter *pcFilter)
 
const MsgFilterListGetFilterList () const
 
const uint32 GetToken ()
 Get the handlers token. More...
 
- Public Member Functions inherited from os::Invoker
 Invoker ()
 Default constructor. More...
 
 Invoker (Message *pcMessage)
 Constructor. More...
 
 Invoker (Message *pcMessage, const Handler *pcHandler, const Looper *pcLooper=NULL)
 Constructor. More...
 
 Invoker (Message *pcMessage, const Messenger &cTarget)
 Constructor. More...
 
virtual ~Invoker ()
 Destructor. More...
 
virtual status_t SetMessage (Message *pcMessage)
 Assign a new message to the invoker. More...
 
MessageGetMessage () const
 Get the message currently assigned to the invoker. More...
 
uint32 GetCode () const
 Get the code field from the currently assigned message. More...
 
virtual void TargetChanged (const Messenger &cOldTarget)
 Virtual hook called by the system after the target has been changed. More...
 
virtual void MessageChanged (const Message &cOldMsg)
 Virtual hook called by the system after the message has been changed. More...
 
virtual status_t SetTarget (const Handler *pcHandler, const Looper *pcLooper=NULL)
 Set a new message target. More...
 
virtual status_t SetTarget (const Messenger &cMessenger)
 Set a new message target. More...
 
bool IsTargetLocal () const
 Check if the target lives in our process. More...
 
HandlerGetTarget (Looper **ppcLooper=NULL) const
 Get the current target. More...
 
Messenger GetMessenger () const
 Get the messenger used to target messages sendt by the invoker. More...
 
virtual status_t SetHandlerForReply (Handler *pcHandler)
 Set a reply target for messages sendt by this messenger. More...
 
HandlerGetHandlerForReply () const
 Get the current reply target for replies on messages sendt by the invoker. More...
 
virtual status_t Invoke (Message *pcMessage=NULL)
 Send the current message to the current target. More...
 

Detailed Description

Description:
The iconview can display icons + descriptions in different ways, e.g. it is used by the os::IconDirectoryView class to display the contents of folders.
See Also
os::IconDirectoryView
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

Member Enumeration Documentation

Enumerator
SCROLL_UP 
SCROLL_DOWN 
SCROLL_LEFT 
SCROLL_RIGHT 
Description:
VIEW_ICONS - Displays icons which are freely moveable.
VIEW_LIST - Displays the icons in a multi-column list.
VIEW_DETAILS - Displays the icons in a single-column list with the
icon strings in the other columns.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)
Enumerator
VIEW_ICONS 
VIEW_LIST 
VIEW_DETAILS 
VIEW_ICONS_DESKTOP 

Constructor & Destructor Documentation

IconView::IconView ( const Rect cFrame,
os::String  zName,
uint32  nResizeMask 
)
IconView::~IconView ( )

Member Function Documentation

uint IconView::AddIcon ( os::Image pcImage,
os::IconData pcData 
)
Description:
Adds a new icon to the iconview.
Note:
You need to call Layout() to make the new icons visible!
Parameters
pcImage- The icon.
pcData- Private data of the icon. A subclass of os::IconData can be used.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::Lock(), Icon::m_bLayouted, Icon::m_bSelected, os::IconView::Private::m_cIcons, Icon::m_cPosition, Icon::m_pcData, Icon::m_pcImage, Icon::m_zStrings, and os::IconView::Private::Unlock().

Referenced by os::IconDirectoryView::HandleMessage().

void IconView::AddIconString ( uint  nIcon,
os::String  zString 
)
Description:
Add a a string of an icon.
Note:
Only the first string will be displayed in all view types. The additional ones only in VIEW_DETAILS.
Parameters
nIcon- Index of the icon.
zString- String.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::Lock(), os::IconView::Private::m_cIcons, and os::IconView::Private::Unlock().

Referenced by os::IconDirectoryView::HandleMessage().

void IconView::Clear ( )
os::Point IconView::ConvertToView ( os::Point  cPoint)
void IconView::DragSelection ( os::Point  cStartPoint)
virtual
Description:
Called when an icon should be dragged.
Parameters
cStartPoint- Start position of the drag.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

Reimplemented in os::IconDirectoryView.

void IconView::EnableStatusChanged ( bool  bIsEnabled)
virtual

Implements os::Control.

uint IconView::GetIconCount ( )
os::IconData * IconView::GetIconData ( uint  nIcon)
os::Image * IconView::GetIconImage ( uint  nIcon)
Description:
Returns the image of an icon of the iconview.
Parameters
nIcon- Index of the icon.
Returns
The image or NULL.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_cIcons.

Referenced by os::IconDirectoryView::DragSelection().

os::Point IconView::GetIconPosition ( uint  nIcon)
Description:
RReturns the current position of an icon of the iconview.
Parameters
nIcon- Index of the icon.
Returns
The position.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_cIcons.

Referenced by os::IconDirectoryView::DragSelection(), os::IconDirectoryView::MouseMove(), and os::IconDirectoryView::MouseUp().

bool IconView::GetIconSelected ( uint  nIcon)
os::Point IconView::GetIconSize ( )
os::String IconView::GetIconString ( uint  nIcon,
uint  nString 
)
Description:
Returns a string of an icon of the iconview.
Parameters
nIcon- Index of the icon.
nString- Index of the string.
Returns
The string or "" if one of the index is invalid.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_cIcons.

Referenced by os::IconDirectoryView::DragSelection(), os::FileRequester::HandleMessage(), and os::IconDirectoryView::HandleMessage().

os::Message * IconView::GetInvokeMsg ( )
virtual
Description:
Returns the message that is sent when an icon is invoked.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::Invoker::GetMessage().

os::Message * IconView::GetSelChangeMsg ( )
virtual
Description:
Returns the message that is sent when the selection changes.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_pcSelChangeMsg.

int IconView::GetTabOrder ( ) const
virtual
Description:
This member is called by the system to decide which view to select next when the <TAB> key is pressed. The focus is given to the next view with higher or equal tab-order as the current. You can overload this member to decide the order whenever it is called, or rely on the default implementation that will return whatever was set by SetTabOrder(). A negative return value means that the view should not be skipped when searching for the next view to activate.
Returns
The views sorting order for keyboard manouvering.
See Also
SetTabOrder()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::View::GetTabOrder(), and os::IconView::Private::m_pcView.

int IconView::GetTabOrder ( )
virtual
IconView::view_type IconView::GetView ( ) const
void IconView::Invoked ( uint  nIcon,
os::IconData pcData 
)
virtual
Description:
Called when an icon is invoked. The default action is to send the message set by SetInvokeMsg()
Parameters
nIcon- Index of the invoked icon.
pcData- Data of the invoked icon.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

Reimplemented in os::IconDirectoryView.

References os::Invoker::Invoke().

Referenced by os::IconDirectoryView::Invoked().

bool IconView::IsAutoSort ( ) const
Description:
Returns whether sorting is enabled.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_bAutoSort.

bool IconView::IsMultiSelect ( ) const
Description:
Returns whether multiselect is enabled.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_bMultiSelect.

bool IconView::IsSingleClick ( ) const
Description:
Returns whether single click mode is enabled.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_bSingleClick.

void IconView::Layout ( )
Description:
Relayouts and updates the view. Necessary after calls like AddIcon() or RemoveIcon().
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::LayoutIcons(), and os::IconView::Private::SortIcons().

Referenced by os::IconDirectoryView::HandleMessage(), and SetView().

void IconView::MakeFocus ( bool  bFocus = true)
virtual
Description:
Change focus of the IconView
Parameters
bFocus- if true set focus else unfocus the IconView
Author
Jonas Jarvoll (jonas.nosp@m.-jar.nosp@m.voll@.nosp@m.syll.nosp@m.able-.nosp@m.nord.nosp@m.en.in.nosp@m.fo)

Reimplemented from os::View.

References os::IconView::Private::m_pcView, and os::View::MakeFocus().

Referenced by os::FileRequester::FileRequester(), os::FileRequester::HandleMessage(), and os::FileRequester::SetPath().

void IconView::OpenContextMenu ( os::Point  cPosition,
bool  bMouseOverIcon 
)
virtual
Description:
Called when the context menu of one icon should be opened.
Parameters
cPosition- Position.
bMouseOverIcon- Whether the contextmenu of an icon should be opened.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

Reimplemented in os::IconDirectoryView.

void IconView::RemoveIcon ( uint  nIcon)
Description:
Removes an icon from the iconview.
Note:
You need to call Layout() to make the changes visible!
Parameters
nIcon- Index of the icon.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::Lock(), os::IconView::Private::m_cIcons, and os::IconView::Private::Unlock().

Referenced by os::IconDirectoryView::HandleMessage().

void IconView::RenderIcon ( uint  nIcon,
os::View pcView,
os::Point  cPosition 
)
Description:
Renders an icon in a view. Should only be used in special cases.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::RenderIcon().

Referenced by os::IconDirectoryView::DragSelection().

void IconView::RenderIcon ( os::String  zName,
os::Image pcImage,
os::View pcView,
os::Point  cPosition 
)
Description:
Renders an icon in a view. Should only be used in special cases.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::RenderIcon().

void IconView::ScrollToIcon ( uint  nIcon)
void IconView::SelectionChanged ( )
virtual
Description:
Called when an icon is selected. The default action is to send the message set by SetSelChangeMsg()
Parameters
nIcon- Index of the invoked icon.
pcData- Data of the invoked icon.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::Invoker::Invoke(), and os::IconView::Private::m_pcSelChangeMsg.

Referenced by SetIconSelected().

void IconView::SetAutoSort ( bool  bAutoSort)
Description:
Enables/Disables the sorting of the icons.
Parameters
bAutoSort- Whether sorting is enabled.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_bAutoSort.

void IconView::SetBackground ( os::Image pcImage)
Description:
Sets a new background image and updates the view.
Note:
The previous image will be deleted.
Parameters
pcImage- The new image.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::View::Flush(), os::View::Invalidate(), os::IconView::Private::m_pcBackground, and os::IconView::Private::m_pcView.

void IconView::SetBackgroundColor ( os::Color32_s  sColor)
Description:
Sets a new background color and updates the view.
Note:
Not used if a background image is set.
Parameters
sColor- The new color.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::View::Flush(), os::View::Invalidate(), os::IconView::Private::m_pcView, and os::IconView::Private::m_sBackgroundColor.

void IconView::SetIconImage ( uint  nIcon,
os::Image pcImage 
)
Description:
Sets the image of an icon.
Parameters
nIcon- Index of the icon.
pcImage- New image. The old one will be deleted.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::View::Flush(), GetIconSize(), os::View::Invalidate(), os::IconView::Private::Lock(), os::IconView::Private::m_cIcons, os::IconView::Private::m_pcView, and os::IconView::Private::Unlock().

Referenced by os::IconDirectoryView::HandleMessage().

void IconView::SetIconPosition ( uint  nIcon,
os::Point  cPosition 
)
void IconView::SetIconSelected ( uint  nIcon,
bool  bSelected,
bool  bDeselectAll = true 
)
Description:
Sets the selection status of an icon and updates the view.
Parameters
nIcon- Index of the icon.
bSelected- New select status.
bDeselectAll- Whether all icons should be deslected first.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::DeselectAll(), os::View::Flush(), os::IconView::Private::Lock(), os::IconView::Private::m_cIcons, os::IconView::Private::m_pcView, os::IconView::Private::Select(), SelectionChanged(), and os::IconView::Private::Unlock().

Referenced by os::IconDirectoryView::MouseMove().

void IconView::SetIconString ( uint  nIcon,
uint  nString,
os::String  zString 
)
Description:
Sets a a string of an icon.
Note:
You have to add new strings using the AddIconString() method.
Parameters
nIcon- Index of the icon.
nString- Index of the string.
zString- String.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::View::Flush(), GetIconSize(), os::View::Invalidate(), os::IconView::Private::Lock(), os::IconView::Private::m_cIcons, os::IconView::Private::m_pcView, and os::IconView::Private::Unlock().

Referenced by os::IconDirectoryView::HandleMessage().

void IconView::SetInvokeMsg ( os::Message pcMessage)
Description:
Sets the message that is sent when an icon is invoked.
Parameters
pcMessage- New message.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::Invoker::SetMessage().

Referenced by os::FileRequester::FileRequester().

void IconView::SetMultiSelect ( bool  bMultiSelect)
Description:
Enables/Disables whether the selection of multiple icons is allowed.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_bMultiSelect.

Referenced by os::FileRequester::FileRequester().

void IconView::SetSelChangeMsg ( os::Message pcMessage)
Description:
Sets the message that is sent when the selection changes.
Parameters
pcMessage- New message.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_pcSelChangeMsg.

Referenced by os::FileRequester::FileRequester().

void IconView::SetSelectionColor ( os::Color32_s  sColor)
Description:
Sets a new color for the selection rectangle.
Note:
Please make sure that the color doesn’t make the text invisible.
Parameters
sColor- The new color.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::View::Flush(), os::View::Invalidate(), os::IconView::Private::m_pcView, and os::IconView::Private::m_sSelectionColor.

void IconView::SetSingleClick ( bool  bSingleClick)
Description:
Enables/Disables single click mode. In single click mode the icons will already be invoked with a single click.
Parameters
bSingleClick- Whether single click mode is enabled.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References os::IconView::Private::m_bSingleClick.

Referenced by os::IconDirectoryView::IconDirectoryView().

void IconView::SetTabOrder ( int  nOrder = NEXT_TAB_ORDER)
virtual
Description:
Set the value that will be returned by GetTabOrder().
Parameters
nOrder- The sorting order.
See Also
GetTabOrder()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::IconView::Private::m_pcView, os::NO_TAB_ORDER, and os::View::SetTabOrder().

void IconView::SetTextColor ( os::Color32_s  sColor)
Description:
Sets a new text color and updates the view.
Note: SetTextColor overwrites SetTextShadowColor to disable shadows
Please make sure that the background color/image doesn’t make the text invisible.
Parameters
sColor- The new color.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de) Andreas Benzler (andre.nosp@m.as.b.nosp@m.enzle.nosp@m.r@t-.nosp@m.onlin.nosp@m.e.de)

References os::View::Flush(), os::View::Invalidate(), os::IconView::Private::m_pcView, os::IconView::Private::m_sTextColor, and os::IconView::Private::m_sTextShadowColor.

void IconView::SetTextShadowColor ( os::Color32_s  sColor)
Description:
Sets a new color for the shadows of the text.
Note: SetTextColor overwrites SetTextShadowColor to disable shadows.
Parameters
sColor- The new color.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de) Andreas Benzler (andre.nosp@m.as.b.nosp@m.enzle.nosp@m.r@t-.nosp@m.onlin.nosp@m.e.de)

References os::View::Flush(), os::View::Invalidate(), os::IconView::Private::m_pcView, and os::IconView::Private::m_sTextShadowColor.

void IconView::SetView ( view_type  eType)
Description:
Sets a new view type and updates the view.
Parameters
eType- View type.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References Layout(), and os::IconView::Private::m_eType.

Referenced by os::FileRequester::FileRequester().

void IconView::StartScroll ( scroll_direction  eDirection)
void IconView::StopScroll ( )