<commit_before>#pragma once
//=====================================================================//
/*!	@file
	@brief	GUI widget_frame クラス（ヘッダー）
	@author	平松邦仁 (<EMAIL>)
*/
//=====================================================================//
#include "widgets/widget_director.hpp"

namespace gui {

	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	/*!
		@brief	GUI widget_frame クラス
	*/
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	struct widget_frame : public widget {

		typedef widget_frame value_type;

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
		/*!
			@brief	widget_frame パラメーター
		*/
		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
		struct param {
			plate_param		plate_param_;
			color_param		color_param_;
			text_param		text_param_;

			param() : plate_param_(),
				color_param_(widget_director::default_frame_color_),
				text_param_()
			{ }
		};

	private:
		widget_director&	wd_;

		param				param_;

		gl::mobj::handle	objh_;

	public:
		//-----------------------------------------------------------------//
		/*!
			@brief	コンストラクター
		*/
		//-----------------------------------------------------------------//
		widget_frame(widget_director& wd, const widget::param& bp, const param& p) :
			wd_(wd), widget(bp), param_(p), objh_(0) { }


		//-----------------------------------------------------------------//
		/*!
			@brief	デストラクター
		*/
		//-----------------------------------------------------------------//
		virtual ~widget_frame() { }


		//-----------------------------------------------------------------//
		/*!
			@brief	型を取得
		*/
		//-----------------------------------------------------------------//
		type_id type() const { return get_type_id<value_type>(); }


		//-----------------------------------------------------------------//
		/*!
			@brief	widget 型の基本名称を取得
			@return widget 型の基本名称
		*/
		//-----------------------------------------------------------------//
		const char* type_name() const { return "frame"; }


		//-----------------------------------------------------------------//
		/*!
			@brief	ハイブリッド・ウィジェットのサイン
			@return ハイブリッド・ウィジェットの場合「true」を返す。
		*/
		//-----------------------------------------------------------------//
		bool hybrid() const { return false; }


		//-----------------------------------------------------------------//
		/*!
			@brief	個別パラメーターへの取得(ro)
			@return 個別パラメーター
		*/
		//-----------------------------------------------------------------//
		const param& get_local_param() const { return param_; }


		//-----------------------------------------------------------------//
		/*!
			@brief	個別パラメーターへの取得(rw)
			@return 個別パラメーター
		*/
		//-----------------------------------------------------------------//
		param& at_local_param() { return param_; }


		//-----------------------------------------------------------------//
		/*!
			@brief	描画領域の設定
			@param[in]	size	描画領域
		*/
		//-----------------------------------------------------------------//
		void set_draw_area(const vtx::spos& size) {
			short ofs = param_.plate_param_.frame_width_;
			at_rect().size.x = size.x + ofs * 2;
			at_rect().size.y = size.y + ofs * 2 + param_.plate_param_.caption_width_;
		}


		//-----------------------------------------------------------------//
		/*!
			@brief	描画領域の取得
			@param[out]	area	描画領域の参照
		*/
		//-----------------------------------------------------------------//
		void get_draw_area(vtx::srect& area) const {
			short ofs = param_.plate_param_.frame_width_;
			area.org.set(ofs, ofs + param_.plate_param_.caption_width_);
			area.size.x = get_rect().size.x - ofs * 2;
			area.size.y = get_rect().size.y - ofs * 2 - param_.plate_param_.caption_width_;
		}
<commit_msg>全体enable関数の追加<commit_after>#pragma once
//=====================================================================//
/*!	@file
	@brief	GUI widget_frame クラス（ヘッダー）
	@author	平松邦仁 (<EMAIL>)
*/
//=====================================================================//
#include "widgets/widget_director.hpp"

namespace gui {

	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	/*!
		@brief	GUI widget_frame クラス
	*/
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	struct widget_frame : public widget {

		typedef widget_frame value_type;

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
		/*!
			@brief	widget_frame パラメーター
		*/
		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
		struct param {
			plate_param		plate_param_;
			color_param		color_param_;
			text_param		text_param_;

			param() : plate_param_(),
				color_param_(widget_director::default_frame_color_),
				text_param_()
			{ }
		};

	private:
		widget_director&	wd_;

		param				param_;

		gl::mobj::handle	objh_;

	public:
		//-----------------------------------------------------------------//
		/*!
			@brief	コンストラクター
		*/
		//-----------------------------------------------------------------//
		widget_frame(widget_director& wd, const widget::param& bp, const param& p) :
			wd_(wd), widget(bp), param_(p), objh_(0) { }


		//-----------------------------------------------------------------//
		/*!
			@brief	デストラクター
		*/
		//-----------------------------------------------------------------//
		virtual ~widget_frame() { }


		//-----------------------------------------------------------------//
		/*!
			@brief	型を取得
		*/
		//-----------------------------------------------------------------//
		type_id type() const { return get_type_id<value_type>(); }


		//-----------------------------------------------------------------//
		/*!
			@brief	widget 型の基本名称を取得
			@return widget 型の基本名称
		*/
		//-----------------------------------------------------------------//
		const char* type_name() const { return "frame"; }


		//-----------------------------------------------------------------//
		/*!
			@brief	ハイブリッド・ウィジェットのサイン
			@return ハイブリッド・ウィジェットの場合「true」を返す。
		*/
		//-----------------------------------------------------------------//
		bool hybrid() const { return false; }


		//-----------------------------------------------------------------//
		/*!
			@brief	個別パラメーターへの取得(ro)
			@return 個別パラメーター
		*/
		//-----------------------------------------------------------------//
		const param& get_local_param() const { return param_; }


		//-----------------------------------------------------------------//
		/*!
			@brief	個別パラメーターへの取得(rw)
			@return 個別パラメーター
		*/
		//-----------------------------------------------------------------//
		param& at_local_param() { return param_; }


		//-----------------------------------------------------------------//
		/*!
			@brief	有効・無効の設定
			@param[in]	f	無効にする場合「false」
		*/
		//-----------------------------------------------------------------//
		void enable(bool f = true) { wd_.enable(this, f, true); }


		//-----------------------------------------------------------------//
		/*!
			@brief	描画領域の設定
			@param[in]	size	描画領域
		*/
		//-----------------------------------------------------------------//
		void set_draw_area(const vtx::spos& size) {
			short ofs = param_.plate_param_.frame_width_;
			at_rect().size.x = size.x + ofs * 2;
			at_rect().size.y = size.y + ofs * 2 + param_.plate_param_.caption_width_;
		}


		//-----------------------------------------------------------------//
		/*!
			@brief	描画領域の取得
			@param[out]	area	描画領域の参照
		*/
		//-----------------------------------------------------------------//
		void get_draw_area(vtx::srect& area) const {
			short ofs = param_.plate_param_.frame_width_;
			area.org.set(ofs, ofs + param_.plate_param_.caption_width_);
			area.size.x = get_rect().size.x - ofs * 2;
			area.size.y = get_rect().size.y - ofs * 2 - param_.plate_param_.caption_width_;
		}

{'fraction_non_alphanumeric': 0.5222008957133717, 'fraction_numerical': 0.0012795905310300703, 'mean_word_length': 1.0455378173253076, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3212746', 'n_tokens_mistral': 2573, 'n_tokens_neox': 2182, 'n_words': 326}