DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
/************************************************************************ filename: CEGUIItemListbox.h created: Tue Sep 27 2005 author: Tomas Lindquist Olsen *************************************************************************/ /*************************************************************************** * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. ***************************************************************************/ #ifndef _CEGUIItemListbox_h_ #define _CEGUIItemListbox_h_ #include "elements/CEGUIScrolledItemListBase.h" #include "elements/CEGUIItemListboxProperties.h" #if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable : 4251) #endif // begin CEGUI namespace namespace CEGUI { /*! \brief ItemListbox window class */ class CEGUIEXPORT ItemListbox : public ScrolledItemListBase { public: static const String EventNamespace; //!< Namespace for global events static const String WidgetTypeName; //!< Window factory name /************************************************************************ Constants *************************************************************************/ static const String EventSelectionChanged; //!< Event fired when the selection changes. static const String EventMultiSelectModeChanged; //!< Event fired when the multiselect mode changes. /************************************************************************ Accessors *************************************************************************/ /*! \brief Returns the number of selected items in this ItemListbox. */ size_t getSelectedCount(void) const; /*! \brief Returns a pointer to the last selected item. \return A pointer to the last selected item, 0 is none. */ ItemEntry* getLastSelectedItem(void) const {return d_lastSelected;} /*! \brief Returns a pointer to the first selected item \param start_index The index where the search should begin. If omitted the search will begin with the first item. \return A pointer to the first selected item in the listbox. If no item is selected the return value is 0. If \a start_index is out of bounds the return value is 0. \note If multiselect is disabled then this does the equivalent of calling getLastSelectedItem. If multiselect is enabled it will search the array starting at \a start_index */ ItemEntry* getFirstSelectedItem(size_t start_index=0) const; /*! \brief Returns a pointer to the next seleced item relative to a previous call to getFirstSelectedItem or getNextSelectedItem. \return A pointer to the next seleced item. If there are no further selected items the return value is 0. If multiselect is disabled the return value is 0. \note This member function will take on from where the last call to getFirstSelectedItem or getNextSelectedItem returned. So be sure to start with a call to getFirstSelectedItem. This member function should be preferred over getNextSelectedItemAfter as it will perform better, especially on large lists. */ ItemEntry* getNextSelectedItem(void) const; /*! \brief Returns a pointer to the next selected item after the item 'start_item' given. \note This member function will search the array from the beginning and will be slow for large lists, it will not advance the internal counter used by getFirstSelectedItem and getNextSelectedItem either. */ ItemEntry* getNextSelectedItemAfter(const ItemEntry* start_item) const; /*! \brief Returns 'true' if multiple selections are allowed. 'false' if not. */ bool isMultiSelectEnabled(void) const {return d_multiSelect;} /*! \brief Returns 'true' if the item at the given index is selectable and currently selected. */ bool isItemSelected(size_t index) const; /************************************************************************ Manipulators *************************************************************************/ /*! \brief Set whether or not multiple selections should be allowed. */ void setMultiSelectEnabled(bool state); /*! \brief Clears all selections. */ void clearAllSelections(void); /*! \brief Select a range of items. \param a Start item. (inclusive) \param z End item. (inclusive) */ void selectRange(size_t a, size_t z); /*! \brief Select all items. Does nothing if multiselect is disabled. */ void selectAllItems(void); /************************************************************************ Object Construction and Destruction *************************************************************************/ /*! \brief Constructor for the ItemListbox base class constructor. */ ItemListbox(const String& type, const String& name); /*! \brief Destructor for the ItemListbox base class. */ virtual ~ItemListbox(void) {} /************************************************************************ Implementation functions ************************************************************************/ /*! \brief Setup size and position for the item widgets attached to this ItemListbox */ virtual void layoutItemWidgets(); /*! \brief Returns the Size in unclipped pixels of the content attached to this ItemListbox. */ virtual Size getContentSize() const; /*! \brief Return whether this window was inherited from the given class name at some point in the inheritance hierarchy. \param class_name The class name that is to be checked. \return true if this window was inherited from \a class_name. false if not. */ virtual bool testClassName_impl(const String& class_name) const { if (class_name=="ItemListbox") { return true; } return ScrolledItemListBase::testClassName_impl(class_name); } /*! \brief Notify this ItemListbox that the given ListItem was just clicked. Internal function - not to be used from client code. */ virtual void notifyItemClicked(ItemEntry* li); /*! \brief Notify this ItemListbox that the given ListItem just changed selection state. Internal function - not to be used from client code. */ virtual void notifyItemSelectState(ItemEntry* li, bool state); protected: /************************************************************************ Protected implementation functions ************************************************************************/ /*! \brief Returns a pointer to the first selected item starting the search from \a start_index \param start_index The index where the search should begin (inclusive) \return A pointer to the first selected item in the listbox found If no item is selected the return value is 0 If \a start_index is out of bounds the return value is 0 \note This function advances the internal counter and is made for getFirstSelectedItem and getNextSelectedItem */ ItemEntry* findSelectedItem(size_t start_index) const; /************************************************************************ New event handlers ************************************************************************/ virtual void onSelectionChanged(WindowEventArgs& e); virtual void onMultiSelectModeChanged(WindowEventArgs& e); /************************************************************************ Overridden event handlers ************************************************************************/ virtual void onKeyDown(KeyEventArgs& e); /************************************************************************ Static Properties for this class ************************************************************************/ static ItemListboxProperties::MultiSelect d_multiSelectProperty; /************************************************************************ Implementation data ************************************************************************/ bool d_multiSelect; //! Controls whether multiple items can be selected simultaneously ItemEntry* d_lastSelected; //! The last item that was selected mutable size_t d_nextSelectionIndex; //! The index of the last item that was returned with the getFirst/NextSelection members private: void addItemListboxProperties(void); void addItemListboxEvents(void); }; } // end CEGUI namespace #if defined(_MSC_VER) # pragma warning(pop) #endif #endif // end of guard _CEGUIItemListbox_h_
CEGUIItemListbox.h
Page URL
File URL
Prev
20/65
Next
Download
( 10 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.