forked from nique_372/GrapichsByLeo
60 lines
5 KiB
MQL5
60 lines
5 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| Titulo.mqh |
|
|
//| Copyright 2025, Niquel Mendoza. |
|
|
//| https://www.mql5.com/es/users/nique_372/news |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "Copyright 2025, Niquel Mendoza."
|
|
#property link "https://www.mql5.com/es/users/nique_372/news"
|
|
#property strict
|
|
|
|
#ifndef GRAPICH_HISTOGRAM_HISTOGRAMA_TITULO_BY_LEO_MQH
|
|
#define GRAPICH_HISTOGRAM_HISTOGRAMA_TITULO_BY_LEO_MQH
|
|
|
|
#include "..\\..\\General\\TextoCanvas.mqh"
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
enum ENUM_HISTOGRAM_TITULO_POSICION
|
|
{
|
|
HISTOGRAM_TITULO_ARRIBA,
|
|
HISTOGRAM_TITULO_ABAJO
|
|
};
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
class CHistogramTitulo : public CTextCanvas
|
|
{
|
|
private:
|
|
ENUM_HISTOGRAM_TITULO_POSICION m_tit_position;
|
|
int m_reserve_y;
|
|
|
|
public:
|
|
//--- Creación (ocultamos del padre)
|
|
void Create(CCanvasCustom *c, int x, int y, string txt, uint clr, uint align, ENUM_HISTOGRAM_TITULO_POSICION pos, int res_y
|
|
, int fontsize = 0, string font = NULL, uint flagtext = UINT_MAX, uint textpos = UINT_MAX);
|
|
|
|
//---
|
|
__forceinline ENUM_HISTOGRAM_TITULO_POSICION TituloPosition() const { return m_tit_position; }
|
|
|
|
//---
|
|
__forceinline int ReserveY() const { return m_reserve_y;}
|
|
};
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
void CHistogramTitulo::Create(CCanvasCustom *c, int x, int y, string txt, uint clr, uint align, ENUM_HISTOGRAM_TITULO_POSICION pos, int res_y
|
|
, int fontsize = 0, string font = NULL, uint flagtext = UINT_MAX, uint textpos = UINT_MAX)
|
|
{
|
|
if(m_init)
|
|
return;
|
|
|
|
m_tit_position = pos;
|
|
m_reserve_y = res_y;
|
|
CTextCanvas::Create(c, x, y, txt, clr, align, fontsize, font, flagtext, textpos);
|
|
}
|
|
|
|
#endif
|
|
//+------------------------------------------------------------------+
|