listview_selected_item.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2009 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Harry Storbacka
00027 */
00028 
00031 
00032 #pragma once
00033 
00034 #include "../api_gui.h"
00035 #include "listview_item.h"
00036 
00037 class CL_ListViewSelectedItem_Impl;
00038 class CL_ListViewSelection_Impl;
00039 
00043 class CL_API_GUI CL_ListViewSelectedItem
00044 {
00047 
00048 public:
00049         CL_ListViewSelectedItem();
00050 
00054         CL_ListViewSelectedItem(const CL_ListViewItem &item);
00055 
00059 
00060 public:
00061 
00065         bool is_null() const;
00066 
00070         bool is_item() const;
00071 
00075         CL_ListViewItem get_item();
00076 
00080         CL_ListViewSelectedItem prev();
00081 
00085         CL_ListViewSelectedItem get_next_sibling();
00086 
00090 
00091 public:
00092 
00096 
00097 private:
00098 
00102         CL_ListViewSelectedItem(const CL_SharedPtr<CL_ListViewSelectedItem_Impl> &impl);
00103 
00104         CL_SharedPtr<CL_ListViewSelectedItem_Impl> impl;
00105 
00106         friend class CL_ListViewSelection;
00108 };
00109 
00113 class CL_API_GUI CL_ListViewSelection
00114 {
00117 
00118 public:
00119         CL_ListViewSelection();
00120 
00124 
00125 public:
00126 
00130         CL_ListViewSelectedItem get_first();
00131 
00135         CL_ListViewSelectedItem get_last();
00136 
00140 
00141 public:
00142 
00146         void append(const CL_ListViewItem &item);
00147 
00151         void remove(const CL_ListViewItem &item);
00152 
00154         void clear();
00155 
00159 
00160 private:
00161         CL_SharedPtr<CL_ListViewSelection_Impl> impl;
00163 };
00164 

Generated on Thu Dec 3 02:39:30 2009 for ClanLib by  doxygen 1.4.6