develop group
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
/*
|
||||
* A filesystem Implementation
|
||||
* Copyright(C) 2003 Jinhao(cnjinhao@hotmail.com)
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* @file: stdex/filesystem/filesystem.hpp
|
||||
* @file: nana/filesystem/filesystem.hpp
|
||||
* @description:
|
||||
* file_iterator is a toolkit for applying each file and directory in a
|
||||
* specified path.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* @file: nana/gui/widgets/group.hpp
|
||||
*
|
||||
* @contributors: Stefan Pfeifer (st-321), Jinhao, Ariel Vina-Rodriguez (qPCR4vir)
|
||||
* @Author: Stefan Pfeifer(st-321), Ariel Vina-Rodriguez (qPCR4vir)
|
||||
*
|
||||
* @brief group is a widget used to visually group and layout other widgets.
|
||||
*/
|
||||
@@ -21,27 +21,34 @@
|
||||
#include <nana/gui/widgets/panel.hpp>
|
||||
|
||||
namespace nana{
|
||||
class group
|
||||
: public panel<true>
|
||||
{
|
||||
place plc_outer{*this};
|
||||
panel<false> content {*this};
|
||||
place plc_inner{content};
|
||||
|
||||
class group
|
||||
: public panel<true>
|
||||
{
|
||||
struct implement;
|
||||
public:
|
||||
group( window parent, ///<
|
||||
std::wstring titel_ ={STR("")}, ///<
|
||||
bool format =false, ///< Use a formated label?
|
||||
unsigned gap =2, ///< betwen the content and the external limit
|
||||
rectangle r ={} ///<
|
||||
);
|
||||
public:
|
||||
group( window parent, ///<
|
||||
std::wstring titel_ ={STR("")}, ///<
|
||||
bool format =false, ///< Use a formated label?
|
||||
unsigned gap =2, ///< betwen the content and the external limit
|
||||
rectangle r ={} ///<
|
||||
);
|
||||
|
||||
~group();
|
||||
|
||||
place& plc (){ return plc_inner; }
|
||||
window inner(){ return content; }
|
||||
place& get_place();
|
||||
|
||||
template<typename Widget, typename ...Args>
|
||||
Widget* create_child(const char* field, Args && ... args)
|
||||
{
|
||||
auto wdg = new Widget(inner(), std::forward<Args>(args)...);
|
||||
_m_add_child(field, wdg);
|
||||
return wdg;
|
||||
}
|
||||
|
||||
window inner();
|
||||
private:
|
||||
void _m_add_child(const char* field, widget*);
|
||||
|
||||
::nana::string _m_caption() const override;
|
||||
void _m_caption(::nana::string&&) override;
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user