My Project
D:/source/c++/Programme/sally/sally/sallyAPI/DropDown.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #pragma once
00029 #include "Define.h"
00030 #include "Control.h"
00031 #include "DropDownItem.h"
00032 
00033 namespace SallyAPI
00034 {
00035         namespace GUI
00036         {
00045 
00046                 class DLL_API_SALLY CDropDown :
00047                         public SallyAPI::GUI::CControl
00048                 {
00049                 private:
00050                         bool            m_bParentLocalised;
00051                         int                     m_iImage;
00052                         int                     m_iImageSize;
00053                         std::string     m_strIdentifier;
00054                         float           m_fDeltaStart;
00055                         std::vector<SallyAPI::GUI::CDropDownItem>       m_vItems;
00056 
00057                         void                    SetImageId(int image);
00058                         virtual void    SetText(const std::string& text);
00059 
00060                         virtual void    RenderControl();
00061                         virtual bool    ProcessMouseUp(int x, int y);
00062                 public:
00063                         CDropDown(SallyAPI::GUI::CGUIBaseObject* parent, int x, int y, int width, int controlId = 0);
00064                         virtual ~CDropDown();
00065 
00066                         virtual void    SetLocalised(bool localised);
00067                         virtual bool    IsLocalised();
00068 
00069                         void            AddItem(SallyAPI::GUI::CDropDownItem& item);
00070 
00071                         bool            SelectItemById(int id);
00072                         bool            SelectItemByIdentifier(const std::string& identifier);
00073                         std::string     GetSelectedIdentifier();
00074 
00075                         void            Clear();
00076 
00077                         int                     GetListSize();
00078 
00079                         void            SortByName();
00080 
00081                         std::vector<SallyAPI::GUI::CDropDownItem>& GetItemList();
00082                 };
00083         }
00084 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines