Skip to content

Commit

Permalink
Added comments around headers. Added default constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry Carter committed Sep 1, 2015
1 parent 3c63fd1 commit 5b9e629
Show file tree
Hide file tree
Showing 21 changed files with 400 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Gui.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,7 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================

*/
#if ARDUINO < 100
#include <WProgram.h>
#else
Expand Down
3 changes: 2 additions & 1 deletion GuiButton.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
3 changes: 2 additions & 1 deletion GuiCheckBox.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
3 changes: 2 additions & 1 deletion GuiElementList.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
3 changes: 2 additions & 1 deletion GuiGrid.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
4 changes: 3 additions & 1 deletion GuiLabel.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

//an external global reference to the tft.
Expand Down
3 changes: 2 additions & 1 deletion GuiLibrary.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#if ARDUINO < 100
#include <WProgram.h>
Expand Down
11 changes: 6 additions & 5 deletions GuiLibrary.h
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#ifndef _GUILIBRARY_H_
#define _GUILIBRARY_H_
Expand Down Expand Up @@ -129,7 +130,7 @@ class GuiElement {

class GuiLabel : public GuiElement {
public:
GuiLabel(void);
GuiLabel(void) : GuiElement(0, 0, 0, 0) { labelText = ""; };
GuiLabel(int16_t x, int16_t y, int16_t width, int16_t height, char const* text): GuiElement(x, y, width, height) { labelText = text; };

uint8_t textAlignH = TEXT_H_ALIGN_LEFT;
Expand All @@ -150,7 +151,7 @@ class GuiLabel : public GuiElement {

class GuiElementList : public GuiElement {
public:
GuiElementList(void);
GuiElementList(void) : GuiElement(0, 0, 0, 0) {};
GuiElementList(int16_t x, int16_t y, int16_t width, int16_t height) : GuiElement(x, y, width, height) {};

void addChild(GuiElement* child);
Expand All @@ -169,7 +170,7 @@ class GuiElementList : public GuiElement {

class GuiButton : public GuiLabel {
public:
GuiButton(void);
GuiButton(void) : GuiLabel(0, 0, 0, 0, "") { borderWidth = 1; textAlignH = TEXT_H_ALIGN_CENTRE; transparent(false); };
GuiButton(int16_t x, int16_t y, int16_t width, int16_t height, char const* text) : GuiLabel(x, y, width, height, text) { borderWidth = 1; textAlignH = TEXT_H_ALIGN_CENTRE; transparent(false); };

void draw(void);
Expand All @@ -188,7 +189,7 @@ class GuiButton : public GuiLabel {

class GuiCheckBox : public GuiLabel {
public:
GuiCheckBox(void);
GuiCheckBox(void) : GuiLabel(0, 0, 0, 0, "") { borderWidth = 0; textAlignH = TEXT_H_ALIGN_LEFT; transparent(true); };
GuiCheckBox(int16_t x, int16_t y, int16_t width, int16_t height, char const* text) : GuiLabel(x, y, width, height, text) { borderWidth = 0; textAlignH = TEXT_H_ALIGN_LEFT; transparent(true); };

void draw(void);
Expand Down
3 changes: 2 additions & 1 deletion GuiListBox.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
3 changes: 2 additions & 1 deletion GuiMultiLineTextBox.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
3 changes: 2 additions & 1 deletion GuiPanel.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
3 changes: 2 additions & 1 deletion GuiRadioList.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
3 changes: 2 additions & 1 deletion GuiUtils.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#include "GuiLibrary.h"

Expand Down
4 changes: 2 additions & 2 deletions LinkedList.cpp
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,7 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================

*/

#include "LinkedList.h"

Expand Down
3 changes: 2 additions & 1 deletion LinkedList.h
@@ -1,4 +1,4 @@
====================================================================================
/*====================================================================================
Copyright (c) 2015 Barry Carter <barry.carter@gmail.com>
Expand All @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
A simple GUI Widget library for TFT screens.
====================================================================================
*/

#ifndef _LINKEDLIST_H_
#define _LINKEDLIST_H_
Expand Down

0 comments on commit 5b9e629

Please sign in to comment.