X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FThirdParty%2Fwx%2Ftreemultictrl%2FTreeMultiItemWindow.h;h=d6063dbcc1a87fd48ccebf5481dc0c5c1e5d0e96;hb=081cd2c85f2435f4e9fba6f14e6dfa8b6456295b;hp=92de588d42ac6824070e4abaabdbb5a949ae6961;hpb=302e341409d918a232cd2ec25f2c533c27eb9011;p=bbtk.git diff --git a/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemWindow.h b/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemWindow.h index 92de588..d6063db 100644 --- a/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemWindow.h +++ b/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemWindow.h @@ -1,95 +1,122 @@ -//--------------------------------------------------------------------------- -// $RCSfile: TreeMultiItemWindow.h,v $ -// $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemWindow.h,v $ -// $Revision: 1.1 $ -// $Date: 2008/03/28 13:42:18 $ -//--------------------------------------------------------------------------- -// Author: Jorgen Bodde -// Copyright: (c) Jorgen Bodde -// License: wxWidgets License -//--------------------------------------------------------------------------- - -#ifndef __TREEMULTIITEMWINDOW_HPP_ -#define __TREEMULTIITEMWINDOW_HPP_ - -#ifdef __GNUG__ - #pragma interface "TreeMultiItemWindow.cpp" -#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include - -#include "TreeMultiItemBase.h" - -class TreeMultiItemWindow : public TreeMultiItemBase -{ -private: - /** The simple control, or complex sizer that represents this window - in the TreeMultiCtrl */ - wxWindow *_window; - - /** Top and front extra spacings, added to X, Y */ - int _topSpacing, _frontSpacing; - - /** Spanning flag */ - bool _span; - -public: - TreeMultiItemWindow(TreeMultiItemNode *parent, const wxString &name = wxEmptyString); - virtual ~TreeMultiItemWindow(); - - // IsClass method - virtual TreeMultiItemWindow *IsTreeMultiItemWindow() const { - return (TreeMultiItemWindow *)this; - }; - - /** Assigns the given window to this TreeMultiItemWindow, and also destroys the - present window. If the assigned window is 0, this item is not drawn - and removed from the tree visually */ - void AssignWindow(wxWindow *wnd); - - /** Get window method */ - wxWindow *GetWindow() { - return _window; - }; - - /* Sets front spacing */ - void SetFrontSpacing(int frontSpacing) { - _frontSpacing = frontSpacing; - }; - /* Gets front spacing */ - int GetFrontSpacing() const { - return _frontSpacing; - }; - /* Sets top spacing */ - void SetTopSpacing(int topSpacing) { - _topSpacing = topSpacing; - }; - /* Gets top spacing */ - int GetTopSpacing() const { - return _topSpacing; - }; - - /* Sets horizontal span, meaning when this is set the window - attached may be resized horizontally when the window is resized */ - void SetHorizontalSpan(bool span) { - _span = span; - }; - - /* Sets horizontal span, meaning when this is set the window - attached may be resized horizontally when the window is resized */ - bool GetHorizontalSpan() const { - return _span; - }; - -#if(CHECKBOXVIEW) - /** Inherited from base, to enable or disable window */ - virtual void SetCheckboxState(int state); -#endif -}; - -#endif - +/* + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its terms. + # ------------------------------------------------------------------------ */ + + +//--------------------------------------------------------------------------- +// $RCSfile: TreeMultiItemWindow.h,v $ +// $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemWindow.h,v $ +// $Revision: 1.2 $ +// $Date: 2012/11/16 08:49:16 $ +//--------------------------------------------------------------------------- +// Author: Jorgen Bodde +// Copyright: (c) Jorgen Bodde +// License: wxWidgets License +//--------------------------------------------------------------------------- + +#ifndef __TREEMULTIITEMWINDOW_HPP_ +#define __TREEMULTIITEMWINDOW_HPP_ + +#ifdef __GNUG__ + #pragma interface "TreeMultiItemWindow.cpp" +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include + +#include "TreeMultiItemBase.h" + +class TreeMultiItemWindow : public TreeMultiItemBase +{ +private: + /** The simple control, or complex sizer that represents this window + in the TreeMultiCtrl */ + wxWindow *_window; + + /** Top and front extra spacings, added to X, Y */ + int _topSpacing, _frontSpacing; + + /** Spanning flag */ + bool _span; + +public: + TreeMultiItemWindow(TreeMultiItemNode *parent, const wxString &name = wxEmptyString); + virtual ~TreeMultiItemWindow(); + + // IsClass method + virtual TreeMultiItemWindow *IsTreeMultiItemWindow() const { + return (TreeMultiItemWindow *)this; + }; + + /** Assigns the given window to this TreeMultiItemWindow, and also destroys the + present window. If the assigned window is 0, this item is not drawn + and removed from the tree visually */ + void AssignWindow(wxWindow *wnd); + + /** Get window method */ + wxWindow *GetWindow() { + return _window; + }; + + /* Sets front spacing */ + void SetFrontSpacing(int frontSpacing) { + _frontSpacing = frontSpacing; + }; + /* Gets front spacing */ + int GetFrontSpacing() const { + return _frontSpacing; + }; + /* Sets top spacing */ + void SetTopSpacing(int topSpacing) { + _topSpacing = topSpacing; + }; + /* Gets top spacing */ + int GetTopSpacing() const { + return _topSpacing; + }; + + /* Sets horizontal span, meaning when this is set the window + attached may be resized horizontally when the window is resized */ + void SetHorizontalSpan(bool span) { + _span = span; + }; + + /* Sets horizontal span, meaning when this is set the window + attached may be resized horizontally when the window is resized */ + bool GetHorizontalSpan() const { + return _span; + }; + +#if(CHECKBOXVIEW) + /** Inherited from base, to enable or disable window */ + virtual void SetCheckboxState(int state); +#endif +}; + +#endif +