listview_column_header.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 **    Magnus Norddahl
00027 **    Harry Storbacka
00028 */
00029 
00032 
00033 #pragma once
00034 
00035 #include "../api_gui.h"
00036 
00037 class CL_ListViewColumnHeader_Impl;
00038 class CL_GUIThemePart;
00039 
00043 class CL_API_GUI CL_ListViewColumnHeader
00044 {
00047 
00048 public:
00049         CL_ListViewColumnHeader();
00050 
00051         ~CL_ListViewColumnHeader();
00052 
00056 
00057 public:
00058         enum TextAlignment
00059         {
00060                 align_left,
00061                 align_right,
00062                 align_center
00063         };
00064 
00068         bool is_null() const;
00069 
00073         CL_StringRef get_column_id() const;
00074 
00078         CL_StringRef get_caption() const;
00079 
00083         int get_width();
00084 
00085         CL_ListViewColumnHeader::TextAlignment get_alignment();
00086 
00090         CL_ListViewColumnHeader get_next_sibling();
00091 
00095         CL_ListViewColumnHeader get_prev_sibling();
00096 
00100 
00101 public:
00102 
00106         void set_alignment(CL_ListViewColumnHeader::TextAlignment align);
00107 
00111         void set_width(int width);
00112 
00116         void set_caption(const CL_StringRef &str);
00117 
00121         void set_column_id(const CL_StringRef &str);
00122 
00126 
00127 public:
00128         CL_Callback_v1<CL_ListViewColumnHeader> &func_size_changed();
00129 
00133 
00134 private:
00135 
00139         CL_ListViewColumnHeader(const CL_SharedPtr<CL_ListViewColumnHeader_Impl> &impl);
00140 
00144         void set_rect(const CL_Rect &rect);
00145 
00149         void set_gui_theme_part(const CL_GUIThemePart &part);
00150 
00151         CL_SharedPtr<CL_ListViewColumnHeader_Impl> impl;
00152 
00153         friend class CL_ListView_Impl;
00154         friend class CL_ListViewHeader;
00155         friend class CL_ListViewHeader_Impl;
00157 };
00158 

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