AWind
Decorator.h
1 #pragma once
2 /*
3  AWind.h - Arduino window library support for Color TFT LCD Boards
4  Copyright (C)2015 Andrei Degtiarev. All right reserved
5 
6 
7  You can always find the latest version of the library at
8  https://github.com/AndreiDegtiarev/AWind
9 
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the CC BY-NC-SA 3.0 license.
13  Please see the included documents for further information.
14 
15  Commercial use of this library requires you to buy a license that
16  will allow commercial use. This includes using the library,
17  modified or not, as a tool to sell products.
18 
19  The license applies to all part of the library including the
20  examples and tools supplied with the library.
21 */
22 class DC;
24 class Decorator
25 {
26 public:
28  virtual int EstimateLeft(DC *dc)
29  {
30  return 0;
31  }
33  virtual int EstimateRight(DC *dc)
34  {
35  return 0;
36  }
38  virtual int EstimateTop(DC *dc)
39  {
40  return 0;
41  }
43  virtual int EstimateBottom(DC *dc)
44  {
45  return 0;
46  }
48 
51  virtual void Draw(DC *dc,int left,int top,int width,int height)=0;
52 };
virtual void Draw(DC *dc, int left, int top, int width, int height)=0
Drawing code implementation.
virtual int EstimateTop(DC *dc)
Estimates decorator top coordinate.
Definition: Decorator.h:38
Device context. Abstraction layer to the device specific drawing code. Coordinates in drawing functio...
Definition: DC.h:29
virtual int EstimateLeft(DC *dc)
Estimates decorator left coordinate.
Definition: Decorator.h:28
Base class for window decorators. This concept allows sharing of drawing setting among more than one ...
Definition: Decorator.h:24
virtual int EstimateRight(DC *dc)
Estimates decorator right coordinate.
Definition: Decorator.h:33
virtual int EstimateBottom(DC *dc)
Estimates decorator bottom coordinate.
Definition: Decorator.h:43