aboutsummaryrefslogtreecommitdiff
path: root/engines/gargoyle/windows.h
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-03 15:43:12 -0700
committerPaul Gilbert2018-12-08 19:05:59 -0800
commitf91cdb19bf2f96ffcb50de7d796bc32fcda38f34 (patch)
tree78cb861a0987d3124d6cd32d0b1c2a036fb8d0b7 /engines/gargoyle/windows.h
parent063cfb35efa155e6383a0262b20baa656732a89a (diff)
downloadscummvm-rg350-f91cdb19bf2f96ffcb50de7d796bc32fcda38f34.tar.gz
scummvm-rg350-f91cdb19bf2f96ffcb50de7d796bc32fcda38f34.tar.bz2
scummvm-rg350-f91cdb19bf2f96ffcb50de7d796bc32fcda38f34.zip
GLK: Add glk style hint methods
Diffstat (limited to 'engines/gargoyle/windows.h')
-rw-r--r--engines/gargoyle/windows.h38
1 files changed, 36 insertions, 2 deletions
diff --git a/engines/gargoyle/windows.h b/engines/gargoyle/windows.h
index bd24892939..5830c7c85e 100644
--- a/engines/gargoyle/windows.h
+++ b/engines/gargoyle/windows.h
@@ -230,6 +230,42 @@ struct WindowStyle {
bool operator==(const WindowStyle &src) const {
return !memcmp(this, &src, sizeof(WindowStyle));
}
+
+ /**
+ * Returns true if the font is proportinate
+ */
+ bool isProp() const {
+ return font == PROPR || font == PROPI || font == PROPB || font == PROPZ;
+ }
+
+ /**
+ * Returns true ifont the font is bold
+ */
+ bool isBold() const {
+ return font == PROPB || font == PROPZ || font == MONOB || font == MONOZ;
+ }
+
+ /**
+ * Returns true ifont the font is italic
+ */
+ bool isItalic() const {
+ return font == PROPI || font == PROPZ || font == MONOI || font == MONOZ;
+ }
+
+ /**
+ * Returns a font that has the following combination of proportinate, bold, and italic
+ */
+ static FACES makeFont(bool p, bool b, bool i) {
+ if (p && !b && !i) return PROPR;
+ if (p && !b && i) return PROPI;
+ if (p && b && !i) return PROPB;
+ if (p && b && i) return PROPZ;
+ if (!p && !b && !i) return MONOR;
+ if (!p && !b && i) return MONOI;
+ if (!p && b && !i) return MONOB;
+ if (!p && b && i) return MONOZ;
+ return PROPR;
+ }
};
/**
@@ -302,8 +338,6 @@ struct Attributes {
* Window definition
*/
class Window {
-protected:
- WindowStyle _styles[style_NUMSTYLES]; ///< style hints and settings for grid and buffer windows
public:
Windows *_windows;
glui32 _rock;