⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 colorfield.h

📁 用于开发Atmel的AVR系列单片机的GCC集成开发环境
💻 H
字号:
//---------------------------------------------------------------------------
#ifndef ColorFieldH
#define ColorFieldH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TColorField : public TGraphicControl
{
private:
         TColor FPalette[16];
         TColor FForeground, FBackground;
         void __fastcall DrawCell (int fieldnum);
         void __fastcall PutText (AnsiString text, int fieldnum);
         TColor __fastcall BuildTextColor (TColor back);
         int __fastcall ColorToCell (TColor col);
         void __fastcall SetForeground (TColor col);
         void __fastcall SetBackground (TColor col);
         TColor __fastcall GetForeground (void);
         TColor __fastcall GetBackground (void);
         TNotifyEvent FOnChange;

protected:
          void __fastcall Paint (void);
          DYNAMIC void __fastcall MouseDown(TMouseButton but, TShiftState shift, int x, int y);
          void __fastcall Change(void);
public:
	__fastcall TColorField(TComponent* Owner);

__published:
   __property TColor Foreground = {read=GetForeground, write=SetForeground, default=clBlack};
   __property TColor Background = {read=GetBackground, write=SetBackground, default=clBlack};
   __property TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -