From 903e4bd44bab47455f533915caaa95bd2fd2e99e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 24 Jun 2007 12:02:23 +0000 Subject: Make the styles array variable length so it can be increased to 256 entries without always taking 24K. --- src/ViewStyle.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ViewStyle.h') diff --git a/src/ViewStyle.h b/src/ViewStyle.h index 39adf81e8..a41e5f452 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -45,7 +45,8 @@ enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterInden class ViewStyle { public: FontNames fontNames; - Style styles[STYLE_MAX + 1]; + size_t stylesSize; + Style *styles; LineMarker markers[MARKER_MAX + 1]; Indicator indicators[INDIC_MAX + 1]; int lineHeight; @@ -103,9 +104,11 @@ public: ViewStyle(); ViewStyle(const ViewStyle &source); ~ViewStyle(); - void Init(); + void Init(size_t stylesSize_=64); void RefreshColourPalette(Palette &pal, bool want); void Refresh(Surface &surface); + void AllocStyles(size_t sizeNew); + void EnsureStyle(size_t index); void ResetDefaultStyle(); void ClearStyles(); void SetStyleFontName(int styleIndex, const char *name); -- cgit v1.2.3