<commit_before>/*
  NUI3 - C++ cross-platform GUI framework for OpenGL based applications
  Copyright (C) 2002-2003 <NAME>

  licence: see nui3/LICENCE.TXT
*/

#pragma once

#include "nui.h"
#include "nuiDecoration.h"



class nuiImageDecoration : public nuiDecoration
{
public:
  nuiImageDecoration(const nglString& rName);
  nuiImageDecoration(const nglString& rName, nuiTexture* pTexture, const nuiRect& rClientRect = nuiRect(0,0,0,0), nuiPosition position = nuiCenter, const nuiColor& rColor = nuiColor(255,255,255,255));
  nuiImageDecoration(const nglString& rName, const nglPath& rTexturePath, const nuiRect& rClientRect = nuiRect(0,0,0,0), nuiPosition position = nuiCenter, const nuiColor& rColor = nuiColor(255,255,255,255));
	void InitAttributes();
  virtual ~nuiImageDecoration();
  
  bool Load(const nuiXMLNode* pNode);
  nuiXMLNode* Serialize(nuiXMLNode* pNode);
  
  void SetSourceClientRect(const nuiRect& rRect);
  const nuiRect& GetSourceClientRect() const;

  virtual nuiSize GetBorder(nuiPosition position, const nuiWidget* pWidget) const;
  virtual nuiRect GetIdealClientRect(const nuiWidget* pWidget) const;
  
  nuiTexture* GetTexture() const;
  
  nglPath GetTexturePath() const;
  void SetTexturePath(nglPath path);

  nuiPosition GetPosition();
  void SetPosition(nuiPosition pos);

  const nuiColor& GetColor() const;
  void SetColor(const nuiColor& rColor);

protected : 

  virtual void Draw(nuiDrawContext* pContext, nuiWidget* pWidget, const nuiRect& rDestRect);

	
private:
  nuiTexture* mpTexture;

	// attributes ***********************************
  nuiRect mClientRect;
  nuiPosition mPosition;
  nuiColor mColor;
};
<commit_msg>gave nuiImageDecoration::Draw a public access<commit_after>/*
  NUI3 - C++ cross-platform GUI framework for OpenGL based applications
  Copyright (C) 2002-2003 <NAME>

  licence: see nui3/LICENCE.TXT
*/

#pragma once

#include "nui.h"
#include "nuiDecoration.h"



class nuiImageDecoration : public nuiDecoration
{
public:
  nuiImageDecoration(const nglString& rName);
  nuiImageDecoration(const nglString& rName, nuiTexture* pTexture, const nuiRect& rClientRect = nuiRect(0,0,0,0), nuiPosition position = nuiCenter, const nuiColor& rColor = nuiColor(255,255,255,255));
  nuiImageDecoration(const nglString& rName, const nglPath& rTexturePath, const nuiRect& rClientRect = nuiRect(0,0,0,0), nuiPosition position = nuiCenter, const nuiColor& rColor = nuiColor(255,255,255,255));
	void InitAttributes();
  virtual ~nuiImageDecoration();
  
  bool Load(const nuiXMLNode* pNode);
  nuiXMLNode* Serialize(nuiXMLNode* pNode);
  
  void SetSourceClientRect(const nuiRect& rRect);
  const nuiRect& GetSourceClientRect() const;

  virtual nuiSize GetBorder(nuiPosition position, const nuiWidget* pWidget) const;
  virtual nuiRect GetIdealClientRect(const nuiWidget* pWidget) const;
  
  nuiTexture* GetTexture() const;
  
  nglPath GetTexturePath() const;
  void SetTexturePath(nglPath path);

  nuiPosition GetPosition();
  void SetPosition(nuiPosition pos);

  const nuiColor& GetColor() const;
  void SetColor(const nuiColor& rColor);

  virtual void Draw(nuiDrawContext* pContext, nuiWidget* pWidget, const nuiRect& rDestRect);
	
private:
  nuiTexture* mpTexture;

	// attributes ***********************************
  nuiRect mClientRect;
  nuiPosition mPosition;
  nuiColor mColor;
};

{'fraction_non_alphanumeric': 0.11629297458893871, 'fraction_numerical': 0.025112107623318385, 'mean_word_length': 5.85655737704918, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7030845', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1125, 'n_words': 281}