Permalink
Browse files

UI Theme support with Traditional and two new themes.

  • Loading branch information...
1 parent 0d10546 commit 5b8c8b48be5c47ae7609dd2d11a9abc73d2f0617 @JesperWe JesperWe committed with David Register Jun 11, 2012
Showing with 31,387 additions and 35,947 deletions.
  1. +32 −15 CMakeLists.txt
  2. +1 −369 include/chart1.h
  3. +59 −0 include/compasswin.h
  4. +2 −2 include/concanv.h
  5. +6 −0 include/ocpn_types.h
  6. +4 −2 include/options.h
  7. +1 −1 include/routeman.h
  8. +8 −7 include/statwin.h
  9. +200 −0 include/styles.h
  10. +368 −0 include/toolbar.h
  11. +1 −1 plugins/dashboard_pi/src/dashboard_pi.cpp
  12. +1 −1 plugins/grib_pi/src/grib_pi.cpp
  13. +4 −5 src/about.cpp
  14. +7 −3 src/ais.cpp
  15. +0 −8 src/bitmaps/README.TXT
  16. +0 −29 src/bitmaps/activepoint.xpm
  17. +0 −23 src/bitmaps/airplane.xpm
  18. BIN src/bitmaps/ais.png
  19. BIN src/bitmaps/ais_alarm.png
  20. BIN src/bitmaps/ais_alarm_active.png
  21. BIN src/bitmaps/ais_alive.png
  22. BIN src/bitmaps/ais_alive_active.png
  23. BIN src/bitmaps/ais_disabled.png
  24. BIN src/bitmaps/ais_supressed.png
  25. BIN src/bitmaps/ais_supressed_active.png
  26. +0 −21 src/bitmaps/anchor.xpm
  27. +0 −22 src/bitmaps/anchorage.xpm
  28. +0 −21 src/bitmaps/boarding.xpm
  29. +0 −23 src/bitmaps/boundary.xpm
  30. +0 −21 src/bitmaps/bouy1.xpm
  31. +0 −21 src/bitmaps/bouy2.xpm
  32. +0 −23 src/bitmaps/campfire.xpm
  33. +0 −21 src/bitmaps/camping.xpm
  34. +0 −21 src/bitmaps/circle.xpm
  35. BIN src/bitmaps/colscheme.png
  36. BIN src/bitmaps/compass.png
  37. +0 −22 src/bitmaps/coral.xpm
  38. +0 −43 src/bitmaps/create_all.sh
  39. BIN src/bitmaps/cross.png
  40. +0 −39 src/bitmaps/cross.xpm
  41. BIN src/bitmaps/current.png
  42. +0 −161 src/bitmaps/default_pi.xpm
  43. +0 −21 src/bitmaps/diamond.xpm
  44. BIN src/bitmaps/donate.png
  45. BIN src/bitmaps/down.png
  46. +0 −277 src/bitmaps/down.xpm
  47. +0 −20 src/bitmaps/empty.xpm
  48. BIN src/bitmaps/exitt.png
  49. +0 −22 src/bitmaps/fish.xpm
  50. +0 −22 src/bitmaps/fishhaven.xpm
  51. +0 −25 src/bitmaps/fishing.xpm
  52. +0 −22 src/bitmaps/float.xpm
  53. BIN src/bitmaps/follow.png
  54. +0 −22 src/bitmaps/food.xpm
  55. +0 −25 src/bitmaps/fuel.xpm
  56. BIN src/bitmaps/gps1.png
  57. BIN src/bitmaps/gps2.png
  58. BIN src/bitmaps/gps3.png
  59. BIN src/bitmaps/gpsGrn.png
  60. BIN src/bitmaps/gpsGry.png
  61. BIN src/bitmaps/gpsRed.png
  62. BIN src/bitmaps/gpsYel.png
  63. BIN src/bitmaps/gpx_export.png
  64. BIN src/bitmaps/gpx_import.png
  65. +0 −48 src/bitmaps/grabber.xpm
  66. +0 −22 src/bitmaps/greenlite.xpm
  67. BIN src/bitmaps/help.png
  68. +0 −283 src/bitmaps/icons.cpp
  69. +0 −67 src/bitmaps/icons.h
  70. BIN src/bitmaps/inviz.png
  71. +0 −21 src/bitmaps/kelp.xpm
  72. BIN src/bitmaps/left.png
  73. +0 −269 src/bitmaps/left.xpm
  74. +0 −22 src/bitmaps/light.xpm
  75. +0 −22 src/bitmaps/light1.xpm
  76. +0 −23 src/bitmaps/litevessel.xpm
  77. BIN src/bitmaps/mercprj.png
  78. BIN src/bitmaps/mob.png
  79. +0 −294 src/bitmaps/mob.xpm
  80. BIN src/bitmaps/mob_btn.png
  81. +0 −23 src/bitmaps/mooring.xpm
  82. +0 −23 src/bitmaps/oilbouy.xpm
  83. +0 −35 src/bitmaps/optimize_png.sh
  84. BIN src/bitmaps/pencil.png
  85. +0 −136 src/bitmaps/pencil.xpm
  86. +0 −23 src/bitmaps/platform.xpm
  87. +0 −134 src/bitmaps/png2wx.pl
  88. +0 −20 src/bitmaps/polyconic.xpm
  89. BIN src/bitmaps/print.png
  90. BIN src/bitmaps/redX.png
  91. +0 −23 src/bitmaps/redgreenlite.xpm
  92. +0 −22 src/bitmaps/redlite.xpm
  93. BIN src/bitmaps/right.png
  94. +0 −271 src/bitmaps/right.xpm
  95. +0 −21 src/bitmaps/rock1.xpm
  96. +0 −21 src/bitmaps/rock2.xpm
  97. BIN src/bitmaps/route.png
  98. BIN src/bitmaps/route_manager.png
  99. +0 −21 src/bitmaps/sand.xpm
  100. BIN src/bitmaps/scin.png
  101. BIN src/bitmaps/scout.png
  102. +0 −22 src/bitmaps/scuba.xpm
  103. BIN src/bitmaps/settings.png
  104. BIN src/bitmaps/ship_red.png
  105. +0 −23 src/bitmaps/shoal.xpm
  106. BIN src/bitmaps/skewprj.png
  107. +0 −21 src/bitmaps/snag.xpm
  108. BIN src/bitmaps/sort_asc.png
  109. BIN src/bitmaps/sort_desc.png
  110. +0 −21 src/bitmaps/square.xpm
  111. +1,285 −0 src/bitmaps/styles.xml
  112. BIN src/bitmaps/text.png
  113. BIN src/bitmaps/tide.png
  114. BIN src/bitmaps/tidesml.png
  115. BIN src/bitmaps/tmercprj.png
  116. BIN src/bitmaps/toolicons_journeyman.png
  117. BIN src/bitmaps/toolicons_journeyman_flat.png
  118. BIN src/bitmaps/toolicons_traditional.png
  119. BIN src/bitmaps/trackoff.png
  120. BIN src/bitmaps/trackon.png
  121. +0 −21 src/bitmaps/triangle.xpm
  122. BIN src/bitmaps/up.png
  123. +0 −281 src/bitmaps/up.xpm
  124. BIN src/bitmaps/viz.png
  125. +0 −21 src/bitmaps/wreck1.xpm
  126. +0 −22 src/bitmaps/wreck2.xpm
  127. +0 −21 src/bitmaps/xmblue.xpm
  128. +0 −21 src/bitmaps/xmgreen.xpm
  129. +0 −21 src/bitmaps/xmred.xpm
  130. BIN src/bitmaps/zoomin.png
  131. BIN src/bitmaps/zoomout.png
  132. +5,981 −9,978 src/chart1.cpp
  133. +683 −669 src/chartsymbols.cpp
  134. +10,842 −12,380 src/chcanv.cpp
  135. +228 −0 src/compasswin.cpp
  136. +40 −29 src/concanv.cpp
  137. +9 −0 src/navutil.cpp
  138. +2,214 −2,243 src/options.cpp
  139. +6 −2 src/pluginmanager.cpp
  140. +421 −422 src/razdsparser.cpp
  141. +61 −156 src/routeman.cpp
  142. +5,570 −5,619 src/s52plib.cpp
  143. +764 −729 src/statwin.cpp
  144. +805 −0 src/styles.cpp
  145. +1,784 −0 src/toolbar.cpp
View
47 CMakeLists.txt
@@ -290,8 +290,8 @@ ENDIF (NOT WIN32)
#FILE(GLOB_RECURSE SRCS *.cpp *.c)
SET(HDRS
- include/ocpn_types.h
- include/ocpndc.h
+ include/ocpn_types.h
+ include/ocpndc.h
include/chart1.h
include/bbox.h
include/ocpn_pixel.h
@@ -313,20 +313,23 @@ SET(HDRS
include/wvschart.h
include/about.h
include/ais.h
- include/pluginmanager.h
- include/ocpn_plugin.h
+ include/pluginmanager.h
+ include/ocpn_plugin.h
include/gpxdocument.h
- include/wx/json_defs.h
- include/wx/jsonwriter.h
- include/chartsymbols.h
- include/razdsparser.h
+ include/wx/json_defs.h
+ include/wx/jsonwriter.h
+ include/chartsymbols.h
+ include/razdsparser.h
+ include/styles.h
+ include/toolbar.h
+ include/compasswin.h
)
SET(SRCS
src/chart1.cpp
src/bbox.cpp
src/ocpn_pixel.cpp
- src/ocpndc.cpp
+ src/ocpndc.cpp
src/chartdb.cpp
src/chartdbs.cpp
src/chartimg.cpp
@@ -345,13 +348,15 @@ SET(SRCS
src/wvschart.cpp
src/about.cpp
src/ais.cpp
- src/pluginmanager.cpp
+ src/pluginmanager.cpp
src/gpxdocument.cpp
- src/wxJSON/jsonwriter.cpp
- src/wxJSON/jsonval.cpp
- src/chartsymbols.cpp
- src/razdsparser.cpp
-
+ src/wxJSON/jsonwriter.cpp
+ src/wxJSON/jsonval.cpp
+ src/chartsymbols.cpp
+ src/razdsparser.cpp
+ src/styles.cpp
+ src/toolbar.cpp
+ src/compasswin.cpp
)
IF(wx_Version MATCHES "2.9")
@@ -575,6 +580,13 @@ SET(wvsData
data/wvsdata/wvs43.dat
)
+SET(uiData
+ src/bitmaps/styles.xml
+ src/bitmaps/toolicons_journeyman.png
+ src/bitmaps/toolicons_journeyman_flat.png
+ src/bitmaps/toolicons_traditional.png
+ )
+
IF (USE_S57)
SET(s57data
data/s57data/attdecode.csv
@@ -646,6 +658,8 @@ IF(APPLE)
SET_SOURCE_FILES_PROPERTIES(
${wvsData} PROPERTIES MACOSX_PACKAGE_LOCATION SharedSupport/wvsdata )
SET_SOURCE_FILES_PROPERTIES(
+ ${uiData} PROPERTIES MACOSX_PACKAGE_LOCATION SharedSupport/uidata )
+SET_SOURCE_FILES_PROPERTIES(
${s57data} PROPERTIES MACOSX_PACKAGE_LOCATION SharedSupport/s57data )
SET_SOURCE_FILES_PROPERTIES(
${tcData} PROPERTIES MACOSX_PACKAGE_LOCATION SharedSupport/tcdata )
@@ -673,6 +687,7 @@ ADD_EXECUTABLE(${PACKAGE_NAME} MACOSX_BUNDLE
${HDRS}
${SRCS}
${wvsData}
+ ${uidata}
${s57data}
${tcData}
data/license.txt
@@ -772,6 +787,8 @@ ENDIF(WIN32)
INSTALL(FILES ${wvsData} DESTINATION ${PREFIX_PKGDATA}/wvsdata PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+INSTALL(FILES ${uiData} DESTINATION ${PREFIX_PKGDATA}/uidata PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+
IF (USE_S57)
INSTALL(FILES ${s57data} DESTINATION ${PREFIX_PKGDATA}/s57data PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
ENDIF (USE_S57)
View
370 include/chart1.h
@@ -67,12 +67,6 @@ class ocpnFloatingToolbarDialog;
//----------------------------------------------------------------------------
// constants
//----------------------------------------------------------------------------
-#define OCPN_USE_PNGICONS
-#define USE_PNG_TIDESML
-#define USE_PNG_CURSOR
-
-
-
#define TIMER_GFRAME_1 999
@@ -157,15 +151,6 @@ class ChartBase;
class wxSocketEvent;
class ocpnToolBarSimple;
-//----------------------------------------------------------------------------
-// Classes
-//----------------------------------------------------------------------------
-WX_DECLARE_STRING_HASH_MAP( char*, string_to_pchar_hash);
-WX_DECLARE_STRING_HASH_MAP(wxBitmap*, string_to_pbitmap_hash);
-WX_DECLARE_STRING_HASH_MAP(wxString*, string_to_string_hash);
-
-
-
// A small class used in an array to describe chart directories
class ChartDirInfo
{
@@ -292,7 +277,6 @@ class MyFrame: public wxFrame
void SetupQuiltMode(void);
void ChartsRefresh(int dbi_hint, ViewPort &vp, bool b_purge = true);
- string_to_pbitmap_hash *GetBitmapHash(){ return m_phash; }
void ShowBrightnessLevelTimedDialog(int brightness, int min, int max);
ArrayOfRect GetCanvasReserveRects();
@@ -311,9 +295,6 @@ class MyFrame: public wxFrame
wxTimer FrameCOGTimer;
wxTimer MemFootTimer;
-
- string_to_pbitmap_hash *m_phash;
-
// PlugIn support
int GetNextToolbarToolId(){return m_next_available_plugin_tool_id;}
void RequestNewToolbar();
@@ -335,13 +316,7 @@ class MyFrame: public wxFrame
ocpnToolBarSimple *CreateAToolbar();
void DestroyMyToolbar();
void UpdateToolbar(ColorScheme cs);
- void PrepareToolbarBitmaps(void);
- void BuildToolBitmap(wxImage *pimg, unsigned char back_color, wxString &index,
- string_to_pbitmap_hash &hash, bool grey = false);
- void BuildGreyScaleTool(wxImage *pimg, unsigned char grey_val, wxString &index,
- string_to_pbitmap_hash &hash);
- void DeleteToolbarBitmaps();
void EnableToolbar(bool newstate);
bool CheckAndAddPlugInTool(ocpnToolBarSimple *tb);
@@ -356,13 +331,6 @@ class MyFrame: public wxFrame
wxString GetGroupName(int igroup);
void LoadHarmonics();
- string_to_pchar_hash tool_xpm_hash; // hash map of [static] toolbar xpm bitmaps
-
-
- string_to_pbitmap_hash tool_bitmap_hash_day;
- string_to_pbitmap_hash tool_bitmap_hash_dusk;
- string_to_pbitmap_hash tool_bitmap_hash_night;
-
int m_StatusBarFieldCount;
ChartCanvas *m_pchart_canvas;
@@ -377,11 +345,9 @@ class MyFrame: public wxFrame
wxString m_last_reported_chart_name;
wxString m_last_reported_chart_pubdate;
- ocpnToolBarSimple *m_toolBar;
-
double COGTable[MAX_COG_AVERAGE_SECONDS];
- wxString m_AIS_bmp_hash_index_last;
+ wxString m_lastAISiconName;
bool m_toolbar_scale_tools_shown;
@@ -461,340 +427,6 @@ class DummyTextCtrl: public wxTextCtrl
};
-
-#include "wx/tbarbase.h"
-
-#define TOOLTIPON_TIMER 10000
-
-class ToolTipWin;
-class ocpnToolBarTool;
-
-// ----------------------------------------------------------------------------
-// ocpnToolBarSimple is a generic toolbar implementation in pure wxWidgets
-// Adapted from wxToolBarSimple( deprecated )
-// ----------------------------------------------------------------------------
-
-class ocpnToolBarSimple : public wxControl
-{
- public:
- // ctors and dtor
- ocpnToolBarSimple() { Init(); }
-
- ocpnToolBarSimple(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxNO_BORDER | wxTB_HORIZONTAL,
- const wxString& name = wxToolBarNameStr)
- {
- Init();
-
- Create(parent, winid, pos, size, style, name);
- }
-
- bool Create(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxNO_BORDER | wxTB_HORIZONTAL,
- const wxString& name = wxToolBarNameStr);
-
- virtual ~ocpnToolBarSimple();
-
- virtual void SetToggledBackgroundColour(wxColour c){ m_toggle_bg_color = c;};
- virtual void SetColorScheme(ColorScheme cs);
-
-
- // implementation from now on
- // --------------------------
-
- // SCROLLING: this has to be copied from wxScrolledWindow since
- // wxToolBarBase inherits from wxControl. This could have been put into
- // wxToolBarSimple, but we might want any derived toolbar class to be
- // scrollable.
-
- // Number of pixels per user unit (0 or -1 for no scrollbar)
- // Length of virtual canvas in user units
- virtual void SetScrollbars(int horizontal, int vertical,
- int x_length, int y_length,
- int x_pos = 0, int y_pos = 0);
-
- // Physically scroll the window
- virtual void Scroll(int x_pos, int y_pos);
- virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
- virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
- virtual void AdjustScrollbars();
-
- // Prepare the DC by translating it according to the current scroll position
- virtual void PrepareDC(wxDC& dc);
-
- int GetScrollPageSize(int orient) const ;
- void SetScrollPageSize(int orient, int pageSize);
-
- // Get the view start
- virtual void ViewStart(int *x, int *y) const;
-
- // Actual size in pixels when scrolling is taken into account
- virtual void GetVirtualSize(int *x, int *y) const;
-
- int CalcScrollInc(wxScrollEvent& event);
-
- // event handlers
- void OnPaint(wxPaintEvent& event);
- void OnSize(wxSizeEvent& event);
- void OnMouseEvent(wxMouseEvent& event);
- void OnKillFocus(wxFocusEvent& event);
- void OnScroll(wxScrollEvent& event);
- void OnToolTipTimerEvent(wxTimerEvent& event);
-
- wxToolBarToolBase *AddTool(int toolid,
- const wxString& label,
- const wxBitmap& bitmap,
- const wxBitmap& bmpDisabled,
- wxItemKind kind,
- const bool b_decorate_toggle_state,
- const wxString& shortHelp,
- const wxString& longHelp,
- wxObject *data);
-
- wxToolBarToolBase *AddTool(int toolid,
- const wxString& label,
- const wxBitmap& bitmap,
- const wxString& shortHelp = wxEmptyString,
- wxItemKind kind = wxITEM_NORMAL)
- {
- return AddTool(toolid, label, bitmap, wxNullBitmap, kind, true, shortHelp, wxEmptyString, NULL);
- }
-
-
- wxToolBarToolBase *InsertTool(size_t pos,
- int id,
- const wxString& label,
- const wxBitmap& bitmap,
- const wxBitmap& bmpDisabled,
- wxItemKind kind,
- const wxString& shortHelp,
- const wxString& longHelp,
- wxObject *clientData);
-
- wxToolBarToolBase *InsertTool(size_t pos, wxToolBarToolBase *tool);
-
- // Only allow toggle if returns true. Call when left button up.
- virtual bool OnLeftClick(int toolid, bool toggleDown);
-
- // Call when right button down.
- virtual void OnRightClick(int toolid, long x, long y);
-
- // Called when the mouse cursor enters a tool bitmap.
- // Argument is wxID_ANY if mouse is exiting the toolbar.
- virtual void OnMouseEnter(int toolid);
-
- wxSize GetMargins() const { return GetToolMargins(); }
- size_t GetToolsCount() const { return m_tools.GetCount(); }
-
- // add an arbitrary control to the toolbar (notice that
- // the control will be deleted by the toolbar and that it will also adjust
- // its position/size)
- //
- // NB: the control should have toolbar as its parent
- virtual wxToolBarToolBase *AddControl(wxControl *control);
- virtual wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
-
- // get the control with the given id or return NULL
- virtual wxControl *FindControl( int toolid );
-
- // add a separator to the toolbar
- virtual wxToolBarToolBase *AddSeparator();
- virtual wxToolBarToolBase *InsertSeparator(size_t pos);
-
- // remove the tool from the toolbar: the caller is responsible for actually
- // deleting the pointer
- virtual wxToolBarToolBase *RemoveTool(int toolid);
-
- // delete tool either by index or by position
- virtual bool DeleteToolByPos(size_t pos);
- virtual bool DeleteTool(int toolid);
-
- // delete all tools
- virtual void ClearTools();
-
- // must be called after all buttons have been created to finish toolbar
- // initialisation
- virtual bool Realize();
-
- // tools state
- // -----------
-
- virtual void EnableTool(int toolid, bool enable);
- virtual void ToggleTool(int toolid, bool toggle);
-
- virtual void SetToolBitmaps(int toolid, wxBitmap *bmp, wxBitmap *bmpDisabled);
-
- // Set this to be togglable (or not)
- virtual void SetToggle(int toolid, bool toggle);
-
- // set/get tools client data (not for controls)
- virtual wxObject *GetToolClientData(int toolid) const;
- virtual void SetToolClientData(int toolid, wxObject *clientData);
-
- // returns tool pos, or wxNOT_FOUND if tool isn't found
- virtual int GetToolPos(int id) const;
-
- // return true if the tool is toggled
- virtual bool GetToolState(int toolid) const;
-
- virtual bool GetToolEnabled(int toolid) const;
-
- virtual void SetToolShortHelp(int toolid, const wxString& helpString);
- virtual wxString GetToolShortHelp(int toolid) const;
- virtual void SetToolLongHelp(int toolid, const wxString& helpString);
- virtual wxString GetToolLongHelp(int toolid) const;
-
- // margins/packing/separation
- // --------------------------
-
- virtual void SetMargins(int x, int y);
- void SetMargins(const wxSize& size) { SetMargins((int) size.x, (int) size.y); }
- virtual void SetToolPacking(int packing){ m_toolPacking = packing; }
- virtual void SetToolSeparation(int separation){ m_toolSeparation = separation; }
-
- virtual wxSize GetToolMargins() const { return wxSize(m_xMargin, m_yMargin); }
- virtual int GetToolPacking() const { return m_toolPacking; }
- virtual int GetToolSeparation() const { return m_toolSeparation; }
-
- // toolbar geometry
- // ----------------
-
- // set the number of toolbar rows
- virtual void SetRows(int nRows);
-
- // the toolbar can wrap - limit the number of columns or rows it may take
- void SetMaxRowsCols(int rows, int cols){ m_maxRows = rows; m_maxCols = cols; }
- int GetMaxRows() const { return m_maxRows; }
- int GetMaxCols() const { return m_maxCols; }
-
- // get/set the size of the bitmaps used by the toolbar: should be called
- // before adding any tools to the toolbar
- virtual void SetToolBitmapSize(const wxSize& size) { m_defaultWidth = size.x; m_defaultHeight = size.y; }
- virtual wxSize GetToolBitmapSize() const { return wxSize(m_defaultWidth, m_defaultHeight); }
-
- // the button size in some implementations is bigger than the bitmap size:
- // get the total button size (by default the same as bitmap size)
- virtual wxSize GetToolSize() const { return GetToolBitmapSize(); }
-
- virtual wxRect GetToolRect(int tool_id);
-
- // returns a (non separator) tool containing the point (x, y) or NULL if
- // there is no tool at this point (corrdinates are client)
- wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y);
-
- // find the tool by id
- wxToolBarToolBase *FindById(int toolid) const;
-
- // return true if this is a vertical toolbar, otherwise false
- bool IsVertical() const { return HasFlag(wxTB_LEFT | wxTB_RIGHT); }
-
- // the list of all our tools
- wxToolBarToolsList m_tools;
-
- // the offset of the first tool
- int m_xMargin;
- int m_yMargin;
-
- // the maximum number of toolbar rows/columns
- int m_maxRows;
- int m_maxCols;
-
- // the tool packing and separation
- int m_toolPacking,
- m_toolSeparation;
-
- // the size of the toolbar bitmaps
- wxCoord m_defaultWidth, m_defaultHeight;
-
- void HideTooltip();
- void KillTooltip();
- void ShowTooltip(){ m_btooltip_show = true; }
-
- protected:
- // common part of all ctors
- void Init();
-
- // implement base class pure virtuals
- virtual wxToolBarToolBase *DoAddTool
- (
- int toolid,
- const wxString& label,
- const wxBitmap& bitmap,
- const wxBitmap& bmpDisabled,
- wxItemKind kind,
- const wxString& shortHelp = wxEmptyString,
- const wxString& longHelp = wxEmptyString,
- wxObject *clientData = NULL,
- wxCoord xPos = wxDefaultCoord,
- wxCoord yPos = wxDefaultCoord
- );
-
- virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
- virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
-
- virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
- virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
- virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
-
- virtual wxToolBarToolBase *CreateTool(int winid,
- const wxString& label,
- const wxBitmap& bmpNormal,
- const wxBitmap& bmpDisabled,
- wxItemKind kind,
- wxObject *clientData,
- const wxString& shortHelp,
- const wxString& longHelp);
- virtual wxToolBarToolBase *CreateTool(wxControl *control, const wxString& label);
- virtual wxToolBarToolBase *CreateTool(wxControl *control);
-
- // helpers
- void DrawTool(wxToolBarToolBase *tool);
- virtual void DrawTool(wxDC& dc, wxToolBarToolBase *tool);
- virtual void SpringUpButton(int index);
-
- int m_currentRowsOrColumns;
-
- int m_pressedTool, m_currentTool;
-
- wxCoord m_lastX, m_lastY;
- wxCoord m_maxWidth, m_maxHeight;
- wxCoord m_xPos, m_yPos;
-
- wxColour m_toggle_bg_color;
- wxColour m_toolOutlineColour;
- ToolTipWin *m_pToolTipWin;
- ocpnToolBarTool *m_last_ro_tool;
-
- ColorScheme m_currentColorScheme;
-
- wxTimer m_tooltip_timer;
- int m_one_shot;
- bool m_btooltip_show;
-
- // scrolling data
- int m_xScrollPixelsPerLine;
- int m_yScrollPixelsPerLine;
- bool m_xScrollingEnabled;
- bool m_yScrollingEnabled;
- int m_xScrollPosition;
- int m_yScrollPosition;
- int m_xScrollLines;
- int m_yScrollLines;
- int m_xScrollLinesPerPage;
- int m_yScrollLinesPerPage;
-
- private:
- DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS_NO_COPY(ocpnToolBarSimple)
-};
-
-
extern int OCPNMessageBox(const wxString& message, const wxString& caption = _T("Message"), int style = wxOK,wxWindow *parent = NULL, int x = -1, int y = -1);
class OCPNMessageDialog
View
59 include/compasswin.h
@@ -0,0 +1,59 @@
+/******************************************************************************
+ *
+ * Project: OpenCPN
+ * Purpose: OpenCPN Main wxWidgets Program
+ * Author: David Register
+ *
+ ***************************************************************************
+ * Copyright (C) 2010 by David S. Register *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************
+ *
+ */
+
+wxColour GetGlobalColor(wxString colorName);
+
+class ocpnFloatingCompassWindow: public wxDialog {
+public:
+ ocpnFloatingCompassWindow( wxWindow *parent );
+ ~ocpnFloatingCompassWindow();
+ void OnPaint( wxPaintEvent& event );
+ wxBitmap CreateBmp();
+ void UpdateStatus( bool bnew = false );
+
+ void OnClose( wxCloseEvent& event );
+ void OnToolLeftClick( wxCommandEvent& event );
+ void MouseEvent( wxMouseEvent& event );
+ void SetColorScheme( ColorScheme cs );
+
+private:
+ wxBitmap m_StatBmp;
+ wxBitmap m_MaskBmp;
+ wxStaticBitmap *m_pStatBoxToolStaticBmp;
+
+ wxWindow *m_pparent;
+ wxBoxSizer *m_topSizer;
+ wxString m_lastgpsIconName;
+ double m_rose_angle;
+
+ wxBitmap _img_compass;
+ wxBitmap _img_gpsRed;
+
+ DECLARE_EVENT_TABLE()
+};
+
+
View
4 include/concanv.h
@@ -118,8 +118,8 @@ class ConsoleCanvas: public wxDialog
void RefreshConsoleData(void);
wxWindow *m_pParent;
- wxStaticBox *pThisLegBox;
- wxStaticBoxSizer *m_pitemStaticBoxSizerLeg;
+ wxStaticText *pThisLegText;
+ wxBoxSizer *m_pitemBoxSizerLeg;
AnnunText *pXTE;
AnnunText *pBRG;
View
6 include/ocpn_types.h
@@ -129,6 +129,12 @@ class ViewPort
};
+//----------------------------------------------------------------------------
+// ocpn Toolbar stuff
+//----------------------------------------------------------------------------
+class ChartBase;
+class wxSocketEvent;
+class ocpnToolBarSimple;
View
6 include/options.h
@@ -133,8 +133,8 @@ enum {
ID_GROUPINSERTDIR,
ID_GROUPREMOVEDIR,
ID_GROUPNEWGROUP,
- ID_GROUPDELETEGROUP
-
+ ID_GROUPDELETEGROUP,
+ ID_STYLESCOMBOBOX
};
// Define an int bit field for dialog return value
@@ -149,6 +149,7 @@ enum {
#define CHANGE_CHARTS 128
#define SCAN_UPDATE 256
#define GROUPS_CHANGED 512
+#define STYLE_CHANGED 1024
#ifndef wxCLOSE_BOX
@@ -342,6 +343,7 @@ class options: public wxScrollingDialog
wxScrolledWindow *itemPanelFont;
wxBoxSizer *m_itemBoxSizerFontPanel;
wxComboBox *m_itemFontElementListBox;
+ wxComboBox *m_itemStyleListBox;
wxComboBox *m_itemLangListBox;
bool m_bVisitLang;
View
2 include/routeman.h
@@ -238,7 +238,7 @@ class WayPointman
RoutePointList *m_pWayPointList;
private:
- void ProcessIcon(wxImage *pimage, wxString key, wxString description);
+ void ProcessIcon(wxBitmap pimage, wxString key, wxString description);
wxBitmap *CreateDimBitmap(wxBitmap *pBitmap, double factor);
View
15 include/statwin.h
@@ -83,11 +83,11 @@ class PianoWin: public wxWindow
void SetTmercIndexArray(ArrayOfInts array);
void SetPolyIndexArray(ArrayOfInts array);
- void SetVizIcon(wxBitmap *picon_bmp){ m_pVizIconBmp = picon_bmp; }
- void SetInVizIcon(wxBitmap *picon_bmp){ m_pInVizIconBmp = picon_bmp; }
- void SetSkewIcon(wxBitmap *picon_bmp){ m_pSkewIconBmp = picon_bmp; }
- void SetTMercIcon(wxBitmap *picon_bmp){ m_pTmercIconBmp = picon_bmp; }
- void SetPolyIcon(wxBitmap *picon_bmp){ m_pPolyIconBmp = picon_bmp; }
+ void SetVizIcon(wxBitmap *picon_bmp){ if( m_pVizIconBmp ) delete m_pVizIconBmp; m_pVizIconBmp = picon_bmp; }
+ void SetInVizIcon(wxBitmap *picon_bmp){ if( m_pInVizIconBmp ) delete m_pInVizIconBmp; m_pInVizIconBmp = picon_bmp; }
+ void SetSkewIcon(wxBitmap *picon_bmp){ if( m_pSkewIconBmp ) delete m_pSkewIconBmp; m_pSkewIconBmp = picon_bmp; }
+ void SetTMercIcon(wxBitmap *picon_bmp){ if( m_pTmercIconBmp ) delete m_pTmercIconBmp; m_pTmercIconBmp = picon_bmp; }
+ void SetPolyIcon(wxBitmap *picon_bmp){ if( m_pPolyIconBmp ) delete m_pPolyIconBmp; m_pPolyIconBmp = picon_bmp; }
wxPoint GetKeyOrigin(int key_index);
void ResetRollover(void);
@@ -180,17 +180,18 @@ class WiFiStatWin: public wxWindow
//----------------------------------------------------------------------------
// StatWin
//----------------------------------------------------------------------------
-class StatWin: public wxWindow
+class StatWin: public wxDialog
{
public:
- StatWin(wxFrame *frame);
+ StatWin(wxWindow *frame);
~StatWin();
void OnSize(wxSizeEvent& event);
void OnPaint(wxPaintEvent& event);
void MouseEvent(wxMouseEvent& event);
int GetFontHeight();
int GetRows(){ return(m_rows);}
void SetColorScheme(ColorScheme cs);
+ void RePosition();
void FormatStat(void);
View
200 include/styles.h
@@ -0,0 +1,200 @@
+/******************************************************************************
+ *
+ * Project: OpenCPN
+ * Purpose: Chart Symbols
+ * Author: Jesper Weissglas
+ *
+ ***************************************************************************
+ * Copyright (C) 2010 by David S. Register *
+ * bdbcat@yahoo.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************
+ *
+ */
+
+#pragma once
+#include <tinyxml.h>
+
+#include "ocpn_types.h"
+
+wxColour GetGlobalColor(wxString colorName);
+
+enum StyleToolIconTypes
+{
+ TOOLICON_NORMAL,
+ TOOLICON_TOGGLED,
+ TOOLICON_DISABLED,
+ TOOLICON_ACTIVE
+};
+
+wxBitmap MergeBitmaps( wxBitmap back, wxBitmap front, wxSize offset );
+
+namespace ocpnStyle {
+
+WX_DECLARE_STRING_HASH_MAP( int, intHash );
+
+class Tool {
+public:
+ wxString name;
+ wxPoint iconLoc;
+ wxPoint rolloverLoc;
+ wxPoint disabledLoc;
+ wxPoint activeLoc;
+ wxBitmap icon;
+ wxBitmap rollover;
+ wxBitmap rolloverToggled;
+ wxBitmap disabled;
+ wxBitmap active;
+ wxBitmap toggled;
+ bool iconLoaded;
+ bool rolloverLoaded;
+ bool rolloverToggledLoaded;
+ bool disabledLoaded;
+ bool activeLoaded;
+ bool toggledLoaded;
+ wxSize customSize;
+
+ void Unload(void) {
+ iconLoaded= false;
+ rolloverLoaded = false;
+ rolloverToggledLoaded = false;
+ disabledLoaded = false;
+ activeLoaded =false;
+ toggledLoaded =false;
+ }
+
+ Tool(void) { Unload(); }
+};
+
+class Icon {
+public:
+ wxString name;
+ wxPoint iconLoc;
+ wxSize size;
+ wxBitmap icon;
+ bool loaded;
+
+ void Unload(void) {
+ loaded = false;
+ }
+
+ Icon(void) { Unload(); }
+};
+
+class Style {
+
+public:
+ Style( void );
+ ~Style( void );
+
+ wxBitmap GetNormalBG();
+ wxBitmap GetActiveBG();
+ wxBitmap GetToggledBG();
+ wxBitmap GetToolbarStart();
+ wxBitmap GetToolbarEnd();
+ bool HasBackground() { return hasBackground; }
+ void HasBackground( bool b ) { hasBackground = b; }
+ wxBitmap GetIcon( wxString name );
+ wxBitmap GetToolIcon( wxString toolname, int iconType = TOOLICON_NORMAL, bool rollover = false );
+ int GetTopMargin() { return toolMarginTop[currentOrientation]; }
+ int GetRightMargin() { return toolMarginRight[currentOrientation]; }
+ int GetBottomMargin() { return toolMarginBottom[currentOrientation]; }
+ int GetLeftMargin() { return toolMarginLeft[currentOrientation]; }
+ int GetToolbarCornerRadius();
+
+ int GetToolSeparation() { return toolSeparation[currentOrientation]; }
+ wxSize GetToolSize() { return toolSize[currentOrientation]; }
+ wxSize GetToggledToolSize() { return toggledBGSize[currentOrientation]; }
+
+ bool HasToolbarStart() { return toolbarStartLoc[currentOrientation] != wxPoint(0,0); }
+ bool HasToolbarEnd() { return toolbarEndLoc[currentOrientation] != wxPoint(0,0); }
+ void DrawToolbarLineStart( wxBitmap& bmp );
+ void DrawToolbarLineEnd( wxBitmap& bmp );
+
+ wxBitmap SetBitmapBrightness( wxBitmap& bitmap );
+
+ void SetOrientation( long orient );
+ void SetColorScheme( ColorScheme cs );
+ void Unload();
+
+ wxString name;
+ wxString description;
+ wxString graphicsFile;
+ int toolMarginTop[2];
+ int toolMarginRight[2];
+ int toolMarginBottom[2];
+ int toolMarginLeft[2];
+ int toolSeparation[2];
+ int cornerRadius[2];
+ wxSize toolSize[2];
+ wxSize toggledBGSize[2];
+ wxPoint toggledBGlocation[2];
+ wxPoint activeBGlocation[2];
+ wxPoint normalBGlocation[2];
+ wxSize verticalIconOffset;
+ wxArrayPtrVoid tools;
+ intHash toolIndex;
+ wxArrayPtrVoid icons;
+ intHash iconIndex;
+ wxBitmap* graphics;
+
+ wxColor consoleFontColor;
+ wxPoint consoleTextBackgroundLoc;
+ wxSize consoleTextBackgroundSize;
+ wxPoint toolbarStartLoc[2];
+ wxSize toolbarStartSize[2];
+ wxPoint toolbarEndLoc[2];
+ wxSize toolbarEndSize[2];
+ wxBitmap consoleTextBackground;
+ wxBitmap toolbarStart[2];
+ wxBitmap toolbarEnd[2];
+
+ bool marginsInvisible;
+
+ int chartStatusIconWidth;
+ bool chartStatusWindowTransparent;
+
+ wxString myConfigFileDir;
+
+private:
+ int currentOrientation;
+ ColorScheme colorscheme;
+ bool hasBackground;
+};
+
+class StyleManager {
+public:
+ StyleManager(void);
+ ~StyleManager(void);
+ StyleManager( wxString& configDir );
+
+ bool IsOK() { return isOK; }
+ void Init( wxString fromPath );
+ void SetStyle( wxString name );
+ void SetStyleNextInvocation( wxString name ) { nextInvocationStyle = name; }
+ wxString GetStyleNextInvocation() { return nextInvocationStyle; }
+ Style* GetCurrentStyle();
+ wxArrayPtrVoid GetArrayOfStyles() { return styles; };
+
+private:
+ bool isOK;
+ wxArrayPtrVoid styles;
+ Style* currentStyle;
+ wxString nextInvocationStyle;
+};
+
+}
View
368 include/toolbar.h
@@ -0,0 +1,368 @@
+/******************************************************************************
+ *
+ * Project: OpenCPN
+ * Purpose: OpenCPN Toolbar
+ * Author: David Register
+ *
+ ***************************************************************************
+ * Copyright (C) 2010 by David S. Register *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************
+ *
+ *
+ */
+
+wxColour GetGlobalColor( wxString colorName );
+
+#include "wx/tbarbase.h"
+
+//----------------------------------------------------------------------------
+// GrabberWindow Definition
+//----------------------------------------------------------------------------
+
+class GrabberWin: public wxPanel {
+public:
+ GrabberWin( wxWindow *parent );
+ void OnPaint( wxPaintEvent& event );
+ void MouseEvent( wxMouseEvent& event );
+ void SetColorScheme( ColorScheme cs );
+
+ wxBitmap m_pbitmap;
+ bool m_bLeftDown;
+ bool m_bRightDown;
+ ocpnStyle::Style* m_style;
+
+DECLARE_EVENT_TABLE()
+};
+
+//----------------------------------------------------------------------------------------------------------
+// ocpnFloatingToolbarDialog Specification
+//----------------------------------------------------------------------------------------------------------
+
+#define FADE_TIMER 2
+
+class ocpnFloatingToolbarDialog: public wxDialog {
+DECLARE_EVENT_TABLE()
+
+public:
+ ocpnFloatingToolbarDialog( wxWindow *parent, wxPoint position, long orient );
+ ~ocpnFloatingToolbarDialog();
+
+ void OnClose( wxCloseEvent& event );
+ void OnWindowCreate( wxWindowCreateEvent& event );
+ void OnToolLeftClick( wxCommandEvent& event );
+ void MouseEvent( wxMouseEvent& event );
+ void FadeTimerEvent( wxTimerEvent& event );
+ bool IsToolbarShown() {
+ return ( m_ptoolbar != 0 );
+ }
+ void Realize();
+ ocpnToolBarSimple *GetToolbar();
+ void Submerge();
+ void Surface();
+ void HideTooltip();
+ void ShowTooltips();
+
+ void DestroyToolBar();
+ void ToggleOrientation();
+ void MoveDialogInScreenCoords( wxPoint posn, wxPoint posn_old );
+ void RePosition();
+ void SetColorScheme( ColorScheme cs );
+ void SetGeometry();
+ long GetOrient() {
+ return m_orient;
+ }
+ void RefreshFadeTimer();
+ int GetDockX() {
+ return m_dock_x;
+ }
+ int GetDockY() {
+ return m_dock_y;
+ }
+
+private:
+ void DoFade( int value );
+
+ wxWindow *m_pparent;
+ ocpnToolBarSimple *m_ptoolbar;
+ wxBoxSizer *m_topSizer;
+
+ GrabberWin *m_pGrabberwin;
+
+ long m_orient;
+ wxTimer m_fade_timer;
+ int m_opacity;
+ ColorScheme m_cs;
+
+ wxPoint m_position;
+ int m_dock_x;
+ int m_dock_y;
+ ocpnStyle::Style* m_style;
+};
+
+#define TOOLTIPON_TIMER 10000
+
+class ToolTipWin;
+class ocpnToolBarTool;
+
+// ----------------------------------------------------------------------------
+// ocpnToolBarSimple is a generic toolbar implementation in pure wxWidgets
+// Adapted from wxToolBarSimple( deprecated )
+// ----------------------------------------------------------------------------
+
+class ocpnToolBarSimple: public wxControl {
+public:
+ // ctors and dtor
+ ocpnToolBarSimple() {
+ Init();
+ }
+
+ ocpnToolBarSimple( wxWindow *parent, wxWindowID winid, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL,
+ const wxString& name = wxToolBarNameStr ) {
+ Init();
+
+ Create( parent, winid, pos, size, style, name );
+ }
+
+ bool Create( wxWindow *parent, wxWindowID winid, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL,
+ const wxString& name = wxToolBarNameStr );
+
+ virtual ~ocpnToolBarSimple();
+
+ virtual void SetToggledBackgroundColour( wxColour c ) {
+ m_toggle_bg_color = c;
+ }
+ ;
+ virtual void SetColorScheme( ColorScheme cs );
+
+ // implementation from now on
+ // --------------------------
+
+ // event handlers
+ void OnPaint( wxPaintEvent& event );
+ void OnSize( wxSizeEvent& event );
+ void OnMouseEvent( wxMouseEvent& event );
+ void OnKillFocus( wxFocusEvent& event );
+ void OnToolTipTimerEvent( wxTimerEvent& event );
+
+ wxToolBarToolBase *AddTool( int toolid, const wxString& label, const wxBitmap& bitmap,
+ const wxBitmap& bmpDisabled, wxItemKind kind = wxITEM_NORMAL,
+ const wxString& shortHelp = wxEmptyString, const wxString& longHelp =
+ wxEmptyString, wxObject *data = NULL );
+
+ wxToolBarToolBase *AddTool( int toolid, const wxString& label, const wxBitmap& bitmap,
+ const wxString& shortHelp = wxEmptyString, wxItemKind kind = wxITEM_NORMAL ) {
+ return AddTool( toolid, label, bitmap, wxNullBitmap, kind, shortHelp );
+ }
+
+ wxToolBarToolBase *InsertTool( size_t pos, int id, const wxString& label,
+ const wxBitmap& bitmap, const wxBitmap& bmpDisabled, wxItemKind kind,
+ const wxString& shortHelp, const wxString& longHelp, wxObject *clientData );
+
+ wxToolBarToolBase *InsertTool( size_t pos, wxToolBarToolBase *tool );
+
+ // Only allow toggle if returns true. Call when left button up.
+ virtual bool OnLeftClick( int toolid, bool toggleDown );
+
+ // Call when right button down.
+ virtual void OnRightClick( int toolid, long x, long y );
+
+ // Called when the mouse cursor enters a tool bitmap.
+ // Argument is wxID_ANY if mouse is exiting the toolbar.
+ virtual void OnMouseEnter( int toolid );
+
+ size_t GetToolsCount() const {
+ return m_tools.GetCount();
+ }
+
+ int GetNoRowsOrColumns() { return m_currentRowsOrColumns; };
+ int GetLineCount() { return m_LineCount; };
+ int GetToolCount() { return m_tools.GetCount(); };
+
+ // add an arbitrary control to the toolbar (notice that
+ // the control will be deleted by the toolbar and that it will also adjust
+ // its position/size)
+ //
+ // NB: the control should have toolbar as its parent
+ virtual wxToolBarToolBase *AddControl( wxControl *control );
+ virtual wxToolBarToolBase *InsertControl( size_t pos, wxControl *control );
+
+ // get the control with the given id or return NULL
+ virtual wxControl *FindControl( int toolid );
+
+ // add a separator to the toolbar
+ virtual wxToolBarToolBase *AddSeparator();
+ virtual wxToolBarToolBase *InsertSeparator( size_t pos );
+
+ // remove the tool from the toolbar: the caller is responsible for actually
+ // deleting the pointer
+ virtual wxToolBarToolBase *RemoveTool( int toolid );
+
+ // delete tool either by index or by position
+ virtual bool DeleteToolByPos( size_t pos );
+ virtual bool DeleteTool( int toolid );
+
+ // delete all tools
+ virtual void ClearTools();
+
+ // must be called after all buttons have been created to finish toolbar
+ // initialisation
+ virtual bool Realize();
+
+ // tools state
+ // -----------
+
+ virtual void EnableTool( int toolid, bool enable );
+ virtual void ToggleTool( int toolid, bool toggle );
+
+ virtual void SetToolBitmaps( int toolid, wxBitmap *bmp, wxBitmap *bmpDisabled );
+ void InvalidateBitmaps();
+
+ // set/get tools client data (not for controls)
+ virtual wxObject *GetToolClientData( int toolid ) const;
+ virtual void SetToolClientData( int toolid, wxObject *clientData );
+
+ // returns tool pos, or wxNOT_FOUND if tool isn't found
+ virtual int GetToolPos( int id ) const;
+
+ // return true if the tool is toggled
+ virtual bool GetToolState( int toolid ) const;
+
+ virtual bool GetToolEnabled( int toolid ) const;
+
+ virtual void SetToolShortHelp( int toolid, const wxString& helpString );
+ virtual wxString GetToolShortHelp( int toolid ) const;
+ virtual void SetToolLongHelp( int toolid, const wxString& helpString );
+ virtual wxString GetToolLongHelp( int toolid ) const;
+
+ // toolbar geometry
+ // ----------------
+
+ // the toolbar can wrap - limit the number of columns or rows it may take
+ void SetMaxRowsCols( int rows, int cols ) {
+ m_maxRows = rows;
+ m_maxCols = cols;
+ }
+ int GetMaxRows() const {
+ return m_maxRows;
+ }
+ int GetMaxCols() const {
+ return m_maxCols;
+ }
+
+ // get/set the size of the bitmaps used by the toolbar: should be called
+ // before adding any tools to the toolbar
+ virtual void SetToolBitmapSize( const wxSize& size ) {
+ m_defaultWidth = size.x;
+ m_defaultHeight = size.y;
+ }
+ virtual wxSize GetToolBitmapSize() const {
+ return wxSize( m_defaultWidth, m_defaultHeight );
+ }
+
+ // the button size in some implementations is bigger than the bitmap size:
+ // get the total button size (by default the same as bitmap size)
+ virtual wxSize GetToolSize() const {
+ return GetToolBitmapSize();
+ }
+
+ virtual wxRect GetToolRect( int tool_id );
+
+ // returns a (non separator) tool containing the point (x, y) or NULL if
+ // there is no tool at this point (corrdinates are client)
+ wxToolBarToolBase *FindToolForPosition( wxCoord x, wxCoord y );
+
+ // find the tool by id
+ wxToolBarToolBase *FindById( int toolid ) const;
+
+ // return true if this is a vertical toolbar, otherwise false
+ bool IsVertical() const {
+ return HasFlag( wxTB_LEFT | wxTB_RIGHT );
+ }
+
+ // the list of all our tools
+ wxToolBarToolsList m_tools;
+
+ // the maximum number of toolbar rows/columns
+ int m_maxRows;
+ int m_maxCols;
+
+ // the size of the toolbar bitmaps
+ wxCoord m_defaultWidth, m_defaultHeight;
+
+ void HideTooltip();
+ void KillTooltip();
+ void ShowTooltip() {
+ m_btooltip_show = true;
+ }
+
+protected:
+ // common part of all ctors
+ void Init();
+
+ // implement base class pure virtuals
+ virtual wxToolBarToolBase *DoAddTool( int toolid, const wxString& label,
+ const wxBitmap& bitmap, const wxBitmap& bmpDisabled, wxItemKind kind,
+ const wxString& shortHelp = wxEmptyString, const wxString& longHelp =
+ wxEmptyString, wxObject *clientData = NULL, wxCoord xPos =
+ wxDefaultCoord, wxCoord yPos = wxDefaultCoord );
+
+ virtual bool DoInsertTool( size_t pos, wxToolBarToolBase *tool );
+ virtual bool DoDeleteTool( size_t pos, wxToolBarToolBase *tool );
+
+ virtual void DoEnableTool( wxToolBarToolBase *tool, bool enable );
+ virtual void DoToggleTool( wxToolBarToolBase *tool, bool toggle );
+
+ virtual wxToolBarToolBase *CreateTool( int winid, const wxString& label,
+ const wxBitmap& bmpNormal, const wxBitmap& bmpDisabled, wxItemKind kind,
+ wxObject *clientData, const wxString& shortHelp, const wxString& longHelp );
+ virtual wxToolBarToolBase *CreateTool( wxControl *control, const wxString& label );
+ virtual wxToolBarToolBase *CreateTool( wxControl *control );
+
+ // helpers
+ void DrawTool( wxToolBarToolBase *tool );
+ virtual void DrawTool( wxDC& dc, wxToolBarToolBase *tool );
+ virtual void SpringUpButton( int index );
+
+ int m_currentRowsOrColumns;
+ int m_LineCount;
+
+ int m_pressedTool, m_currentTool;
+
+ wxCoord m_lastX, m_lastY;
+ wxCoord m_maxWidth, m_maxHeight;
+ wxCoord m_xPos, m_yPos;
+
+ wxColour m_toggle_bg_color;
+ wxColour m_toolOutlineColour;
+ ToolTipWin *m_pToolTipWin;
+ ocpnToolBarTool *m_last_ro_tool;
+
+ ColorScheme m_currentColorScheme;
+
+ wxTimer m_tooltip_timer;
+ int m_one_shot;
+ bool m_btooltip_show;
+
+ ocpnStyle::Style* m_style;
+
+private:
+DECLARE_EVENT_TABLE()
+};
+
View
2 plugins/dashboard_pi/src/dashboard_pi.cpp
@@ -242,7 +242,7 @@ int dashboard_pi::Init(void)
LoadConfig();
// This PlugIn needs a toolbar icon
- m_toolbar_item_id = InsertPlugInTool(_T(""), _img_dashboard, _img_dashboard, wxITEM_CHECK,
+ m_toolbar_item_id = InsertPlugInTool(_T("dashboard"), _img_dashboard, _img_dashboard, wxITEM_CHECK,
_("Dashboard"), _T(""), NULL, DASHBOARD_TOOL_POSITION, 0, this);
ApplyConfig();
View
2 plugins/grib_pi/src/grib_pi.cpp
@@ -112,7 +112,7 @@ int grib_pi::Init(void)
// This PlugIn needs a toolbar icon, so request its insertion if enabled locally
if(m_bGRIBShowIcon)
- m_leftclick_tool_id = InsertPlugInTool(_T(""), _img_grib, _img_grib, wxITEM_CHECK,
+ m_leftclick_tool_id = InsertPlugInTool(_T("grib"), _img_grib, _img_grib, wxITEM_CHECK,
_("Grib"), _T(""), NULL,
GRIB_TOOL_POSITION, 0, this);
View
9 src/about.cpp
@@ -42,10 +42,7 @@
#include "about.h"
#include "chart1.h"
#include "chcanv.h"
-
-extern wxBitmap *_img_donate;
-
-
+#include "styles.h"
// Some constants
@@ -61,6 +58,7 @@ wxString OpenCPNVersion = str_version_start + str_version_major + wxT(".") + str
extern wxString *pHome_Locn;
extern wxString glog_file;
extern wxString gConfig_File;
+extern ocpnStyle::StyleManager* g_StyleManager;
char AboutText[] =
{
@@ -278,7 +276,8 @@ void about::CreateControls()
itemBoxSizer2->Add(pST1);
// "Donate" Button
- wxBitmap donate_bmp = *_img_donate;
+ ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();
+ wxBitmap donate_bmp = style->GetIcon( _T("donate") );
wxButton* donateButton = new wxBitmapButton( itemDialog1, ID_DONATE, donate_bmp, wxDefaultPosition, wxDefaultSize, 0 );
donateButton->SetDefault();
View
10 src/ais.cpp
@@ -58,7 +58,7 @@
#include "navutil.h" // for Select
#include "georef.h"
#include "pluginmanager.h" // for PlugInManager
-#include "bitmaps/icons.h" // for sorting icons
+#include "styles.h"
extern AISTargetQueryDialog *g_pais_query_dialog_active;
extern int g_ais_query_dialog_x, g_ais_query_dialog_y;
@@ -126,6 +126,7 @@ extern bool bGPSValid;
extern PlugInManager *g_pi_manager;
extern TTYWindow *g_NMEALogWindow;
+extern ocpnStyle::StyleManager* g_StyleManager;
// A static structure storing generic position data
// Used to communicate AIVDO events to main application loop
@@ -4959,8 +4960,11 @@ AISTargetListDialog::AISTargetListDialog( wxWindow *parent, wxAuiManager *auimgr
m_pListCtrlAISTargets = new OCPNListCtrl(this, ID_AIS_TARGET_LIST, wxDefaultPosition, wxDefaultSize,
wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_HRULES|wxLC_VRULES|wxBORDER_SUNKEN|wxLC_VIRTUAL );
wxImageList *imglist = new wxImageList( 16, 16, true, 2 );
- imglist->Add(*_img_sort_asc);
- imglist->Add(*_img_sort_desc);
+
+ ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();
+ imglist->Add(style->GetIcon(_T("sort_asc")));
+ imglist->Add(style->GetIcon(_T("sort_desc")));
+
m_pListCtrlAISTargets->AssignImageList( imglist, wxIMAGE_LIST_SMALL );
m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( AISTargetListDialog::OnTargetSelected ), NULL, this );
m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( AISTargetListDialog::OnTargetSelected ), NULL, this );
View
8 src/bitmaps/README.TXT
@@ -1,8 +0,0 @@
-1. Run create_all.sh
-
-Creation scripts require:
-ImageMagick
-Inkscape
-Optipng
-Icoutils
-png2wx.pl
View
29 src/bitmaps/activepoint.xpm
@@ -1,29 +0,0 @@
-/* XPM */
-static const char *activepoint[]={
-"23 23 3 1",
-". c None",
-"A c #ff0000",
-"B c #ffff00",
-"........AAAAAAA........",
-"......AAAAAAAAAAA......",
-"....AAAAAAAAAAAAAAA....",
-"...AAAAAAAAAAAAAAAAA...",
-"..AAAAAAA.....AAAAAAA..",
-"..AAAAA...BBB...AAAAA..",
-".AAAAA..BBBBBBB..AAAAA.",
-".AAAA..BBBBBBBBB..AAAA.",
-"AAAAA.BBBBBBBBBBB.AAAAA",
-"AAAA..BBBBBBBBBBB..AAAA",
-"AAAA.BBBBBBBBBBBBB.AAAA",
-"AAAA.BBBBBBBBBBBBB.AAAA",
-"AAAA.BBBBBBBBBBBBB.AAAA",
-"AAAA..BBBBBBBBBBB..AAAA",
-"AAAAA.BBBBBBBBBBB.AAAAA",
-".AAAA..BBBBBBBBB..AAAA.",
-".AAAAA..BBBBBBB..AAAAA.",
-"..AAAAA...BBB...AAAAA..",
-"..AAAAAAA.....AAAAAAA..",
-"...AAAAAAAAAAAAAAAAA...",
-"....AAAAAAAAAAAAAAA....",
-"......AAAAAAAAAAA......",
-"........AAAAAAA........"};
View
23 src/bitmaps/airplane.xpm
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *airplane[]={
-"16 16 4 1",
-". c None",
-"# c #000000",
-"a c #00007f",
-"b c #00ffff",
-".....#####......",
-".......a........",
-"......aaa.......",
-"......aaa.......",
-"......aba.......",
-".....aabaa......",
-".aaaaaabaaaaaa..",
-"aabbaaaaaaabbaa.",
-".aaaaaaaaaaaaa..",
-"......aaa.......",
-"......aaa.......",
-"......aaa.......",
-"......aaa.......",
-"....aaaaaaa.....",
-"...aabaaabaa....",
-"....aaaaaaa....."};
View
BIN src/bitmaps/ais.png
Deleted file not rendered
View
BIN src/bitmaps/ais_alarm.png
Deleted file not rendered
View
BIN src/bitmaps/ais_alarm_active.png
Deleted file not rendered
View
BIN src/bitmaps/ais_alive.png
Deleted file not rendered
View
BIN src/bitmaps/ais_alive_active.png
Deleted file not rendered
View
BIN src/bitmaps/ais_disabled.png
Deleted file not rendered
View
BIN src/bitmaps/ais_supressed.png
Deleted file not rendered
View
BIN src/bitmaps/ais_supressed_active.png
Deleted file not rendered
View
21 src/bitmaps/anchor.xpm
@@ -1,21 +0,0 @@
-/* XPM */
-static const char *anchor[]={
-"16 16 2 1",
-". c None",
-"# c #000000",
-"................",
-".......##.......",
-"......#..#......",
-"......#..#......",
-".......##.......",
-".......##.......",
-".......##.......",
-".......##.......",
-".......##.......",
-"..##...##...##..",
-".###...##...###.",
-"###....##....###",
-".####..##..####.",
-"...##########...",
-".....######.....",
-"................"};
View
22 src/bitmaps/anchorage.xpm
@@ -1,22 +0,0 @@
-/* XPM */
-static const char *anchorage[]={
-"16 16 3 1",
-". c None",
-"# c #0000ff",
-"a c #c0ffff",
-"...#########....",
-"..##aaaaaaa##...",
-".##aaa###aaa##..",
-"##aaaa#a#aaaa##.",
-"##aaaa###aaaa##.",
-"##aaaaa#aaaaa##.",
-"##aa#######aa##.",
-"##aaaaa#aaaaa##.",
-"##aaaaa#aaaaa##.",
-"##aaaaa#aaaaa##.",
-"##a#aaa#aaa#a##.",
-"##a#aaa#aaa#a##.",
-"##aa##a#a##aa##.",
-".##aaa#a#aaa##..",
-"..##aaaaaaa##...",
-"...#########...."};
View
21 src/bitmaps/boarding.xpm
@@ -1,21 +0,0 @@
-/* XPM */
-static const char *boarding[]={
-"16 16 2 1",
-". c None",
-"# c #7f007f",
-"...#########....",
-"...#...#...#....",
-"..#...###...#...",
-"..#...###...#...",
-".##...###...##..",
-".#...#####...#..",
-".#..#######..#..",
-".#.#########.#..",
-".#.#########.#..",
-".#..#######..#..",
-".#...#####...#..",
-".#....###....#..",
-".#....###....#..",
-"..#...###...#...",
-"...#...#...#....",
-"....#######....."};
View
23 src/bitmaps/boundary.xpm
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *boundary[]={
-"16 16 4 1",
-". c None",
-"b c #000000",
-"# c #7f7f7f",
-"a c #bfbfbf",
-"................",
-".......#........",
-"......a#b.......",
-"......#b#.......",
-".....#a##b......",
-".....aab##......",
-"....aaa##b#.....",
-"....aaa##b#.....",
-"....#aab##b.....",
-"....aaa##b#.....",
-"....#aab##b.....",
-"....aaa##b#.....",
-"....#aab##b.....",
-"....aaa####.....",
-"..########b#b...",
-"..#########b#..."};
View
21 src/bitmaps/bouy1.xpm
@@ -1,21 +0,0 @@
-/* XPM */
-static const char *bouy1[]={
-"16 16 2 1",
-". c None",
-"# c #000000",
-".........#......",
-"........##......",
-".......#.#......",
-".......#.#......",
-"......#..#......",
-".....#...#......",
-".....#...#......",
-".....#...#......",
-".....#..#.......",
-".....#.#........",
-".....#.#........",
-".....##.........",
-"................",
-"...###..........",
-"...###..........",
-"...###.........."};
View
21 src/bitmaps/bouy2.xpm
@@ -1,21 +0,0 @@
-/* XPM */
-static const char *bouy2[]={
-"16 16 2 1",
-". c None",
-"# c #000000",
-"..........#.....",
-".........##.....",
-"........#.#.....",
-"........#.#.....",
-".......#..#.....",
-"......#...#.....",
-"......#...#.....",
-"......#...#.....",
-"......#..#......",
-"......#.#.......",
-"......#.#.......",
-"....####........",
-"...#...#........",
-"...#...#........",
-"...#...#........",
-"....###........."};
View
23 src/bitmaps/campfire.xpm
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *campfire[]={
-"16 16 4 1",
-". c None",
-"a c #90672f",
-"b c #ffc800",
-"# c #ffff00",
-"................",
-"................",
-".......#........",
-"......###.#.....",
-"......#####.....",
-".....#######....",
-"..aa.##bbb##aa..",
-"...aaabbbbaaa...",
-"....aaabbaaa....",
-"......aaaa......",
-"....aaa..aaa....",
-"...aaa....aaa...",
-"..aa........aa..",
-"................",
-"................",
-"................"};
View
21 src/bitmaps/camping.xpm
@@ -1,21 +0,0 @@
-/* XPM */
-static const char *camping[]={
-"16 16 2 1",
-". c None",
-"# c #000000",
-"................",
-"................",
-".....#...#......",
-".....##.##......",
-".......#........",
-"......###.......",
-"......###.......",
-".....#####......",
-".....######.....",
-"....#######.....",
-"....#######.....",
-"...#########....",
-"...#########....",
-"..###########...",
-"..###########...",
-"................"};
View
21 src/bitmaps/circle.xpm
@@ -1,21 +0,0 @@
-/* XPM */
-static const char *circle[]={
-"16 16 2 1",
-". c None",
-"# c #000000",
-".....######.....",
-"....#......#....",
-"..##........##..",
-"..#..........#..",
-".#............#.",
-"#..............#",
-"#......##......#",
-"#.....####.....#",
-"#.....####.....#",
-"#......##......#",
-"#..............#",
-".#............#.",
-"..#..........#..",
-"..##........##..",
-"....#......#....",
-".....######....."};
View
BIN src/bitmaps/colscheme.png
Deleted file not rendered
View
BIN src/bitmaps/compass.png
Deleted file not rendered
View
22 src/bitmaps/coral.xpm
@@ -1,22 +0,0 @@
-/* XPM */
-static const char *coral[]={
-"16 16 3 1",
-". c #00ffff",
-"# c #7f7f00",
-"a c #7f7f7f",
-"................",
-"................",
-".......#........",
-"...#..##..#.....",
-"...#########....",
-"...#aaaaaaa##...",
-"..##aaaaaaa#....",
-"...#aaaaaaa#.#..",
-"...#aaaaaaa####.",
-"..##aaaaaaa#....",
-".###aaaaaaa##...",
-"...#########....",
-"...#.##..##.....",
-"......#..#......",
-"................",
-"................"};
View
43 src/bitmaps/create_all.sh
@@ -1,43 +0,0 @@
-#!/bin/bash
-#/******************************************************************************
-# *
-# * Project: OpenCPN
-# * Purpose: helper shell script
-# * Author: David Register
-# *
-# ***************************************************************************
-# * Copyright (C) 2010 by David S. Register *
-# * *
-# * This program is free software; you can redistribute it and/or modify *
-# * it under the terms of the GNU General Public License as published by *
-# * the Free Software Foundation; either version 2 of the License, or *
-# * (at your option) any later version. *
-# * *
-# * This program is distributed in the hope that it will be useful, *
-# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
-# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-# * GNU General Public License for more details. *
-# * *
-# * You should have received a copy of the GNU General Public License *
-# * along with this program; if not, write to the *
-# * Free Software Foundation, Inc., *
-# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
-# ***************************************************************************
-# */
-
-path=$(dirname $0)
-
-# Require icotool from package icoutils
-# Require convert from package ImageMagick
-# Require inkscape
-
-$path/13xX_svg_src/create_all_13xX.sh $path
-$path/16x16_svg_src/create_all_16x16.sh $path
-$path/28x28_svg_src/create_all_28x28.sh $path
-$path/32x32_svg_src/cursor/create_all_32x32.sh $path
-$path/32x32_svg_src/ribbon/create_all_32x32.sh $path
-$path/other_svg_src/create_opencpn_main_icon.sh $path
-$path/other_svg_src/create_ship.sh $path
-
-$path/png2wx.pl -C $path/icons.cpp -H $path/icons.h -M ICONS_H $path/*.png
-
View
BIN src/bitmaps/cross.png
Deleted file not rendered
View
39 src/bitmaps/cross.xpm
@@ -1,39 +0,0 @@
-/* XPM */
-static const char *cross[] = {
-/* columns rows colors chars-per-pixel */
-"24 24 9 2",
-"+. c None",
-"aa c #33ff33",
-"bb c #0000ff",
-"cc c #00ffff",
-"dd c #ffffff",
-"ee c #000000",
-"ff c #ffff00",
-"gg c #ff0000",
-"hh c #ff00ff",
-/* pixels */
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"gggggggggggggggggggggggggggggggggggggggggggggggg",
-"gggggggggggggggggggggggggggggggggggggggggggggggg",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-"+.+.+.+.+.+.+.+.+.+.+.gggg+.+.+.+.+.+.+.+.+.+.+.",
-};
View
BIN src/bitmaps/current.png
Deleted file not rendered
View
161 src/bitmaps/default_pi.xpm
@@ -1,161 +0,0 @@
-/* XPM */
-static const char *default_pi[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 123 2",
-" c #4E9A05",
-". c #4D9B07",
-"X c #4E9A06",
-"o c #4F9A06",
-"O c #4E9B06",
-"+ c #4F9B06",
-"@ c #4E9A07",
-"# c #4E9B07",
-"$ c #4F9B07",
-"% c #4E9C07",
-"& c #4F9C07",
-"* c #4F9D07",
-"= c #4F9B08",
-"- c #4F9C08",
-"; c #4F9D08",
-": c #4F9D09",
-"> c #509B07",
-", c #509C06",
-"< c #519C07",
-"1 c #519D07",
-"2 c #509B08",
-"3 c #509C08",
-"4 c #519C08",
-"5 c #509D08",
-"6 c #519D08",
-"7 c #519D09",
-"8 c #509E08",
-"9 c #519E08",
-"0 c #519E09",
-"q c #519F09",
-"w c #529E08",
-"e c #529E09",
-"r c #529F09",
-"t c #529F0A",
-"y c #539F0B",
-"u c #52A009",
-"i c #53A009",
-"p c #53A00A",
-"a c #53A10A",
-"s c #53A00B",
-"d c #53A10B",
-"f c #53A20A",
-"g c #54A009",
-"h c #54A10A",
-"j c #54A10B",
-"k c #55A10B",
-"l c #54A20B",
-"z c #55A20B",
-"x c #56A30B",
-"c c #55A30C",
-"v c #56A30C",
-"b c #56A40C",
-"n c #57A40C",
-"m c #56A40D",
-"M c #57A40D",
-"N c #56A50D",
-"B c #57A50D",
-"V c #57A60E",
-"C c #58A50D",
-"Z c #58A60D",
-"A c #58A70D",
-"S c #59A50E",
-"D c #58A70E",
-"F c #59A70E",
-"G c #59A70F",
-"H c #5AA80F",
-"J c #5BA90F",
-"K c #5AAA0F",
-"L c #5BAA0F",
-"P c #5BA910",
-"I c #5BAA10",
-"U c #5CAB11",
-"Y c #5DAB11",
-"T c #5DAD11",
-"R c #5DAC12",
-"E c #5EAD12",
-"W c #5EAE12",
-"Q c #5FAE12",
-"! c #5EAF12",
-"~ c #5FAE13",
-"^ c #5FAF13",
-"/ c #5EAE14",
-"( c #62B215",
-") c #63B315",
-"_ c #63B517",
-"` c #64B417",
-"' c #64B517",
-"] c #65B517",
-"[ c #65B717",
-"{ c #65B718",
-"} c #66B718",
-"| c #67B919",
-" . c #68B819",
-".. c #68B91A",
-"X. c #69BB1B",
-"o. c #6ABC1B",
-"O. c #6BBE1C",
-"+. c #6CBE1C",
-"@. c #6CBF1D",
-"#. c #6EC01E",
-"$. c #6FC11F",
-"%. c #6FC31F",
-"&. c #71C420",
-"*. c #71C521",
-"=. c #72C621",
-"-. c #72C522",
-";. c #73C622",
-":. c #73C823",
-">. c #75C924",
-",. c #75CA24",
-"<. c #77CB25",
-"1. c #79CD26",
-"2. c #79CE27",
-"3. c #7BD129",
-"4. c #7CD028",
-"5. c #7ED32A",
-"6. c #80D62C",
-"7. c #82D82D",
-"8. c #82D82E",
-"9. c #84DB2F",
-"0. c #85DD30",
-"q. c #86DE31",
-"w. c None",
-/* pixels */
-"w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.4 0 : 3 w.w.w.w.w.w.w.w.w.w.",
-"w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.5 T ' ` ( ^ 9 w.w.w.w.w.w.w.w.w.",
-"w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.J ..} ` ( ^ m w.w.w.w.w.w.w.w.w.",
-"w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.Q ..} ` ( ! 5 w.w.w.w.w.w.w.w.w.",
-"w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.C ..} ` ( z w.w.w.w.w.w.w.w.w.w.",
-"w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.t ..} ` E O w.w.w.w.w.w.w.w.w.w.",
-"w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.9 ..} ` B w.w.w.w.w.w.w.w.w.w.w.",
-"w.w.w.w.w.w.w.w.w.3 t r e e 0 0 > { } ` h 2 3 & $ $ $ $ # w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.o...} ` ( ^ R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.o...} ` ( ^ R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.o...} ` ( ^ R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.o...} ` ( ^ R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.o...} ` ( ^ R Z n B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.o...} ` ( M = * > $ u r 5 . w.w.",
-"w.w.w.w.j w.w.w.w.i <.>.;.&.$.@.o...} ` W - w.w.w.w.w.# @ X w.w.",
-"w.w.w.Y 1.) i w.w.i <.>.;.&.$.@.o...} ` c w.w.w.w.w.w.w.w.w.w.w.",
-"w.w.f 7.9.8.<.c a 8 <.>.;.&.$.@.o...} ` k w.w.w.w.w.w.w.w.w.w.w.",
-"w.w.z q.9.8.6.5.-.| <.>.;.&.$.@.o...} ` S w.w.w.w.w.w.w.w.w.w.w.",
-"w.w.b q.9.8.6.5.3.2.<.>.;.&.$.@.o...} ` ~ < w.w.w.w.w.w.@ O w.w.",
-"w.w.d 0.9.8.6.5.3.2.<.>.;.&.$.@.o...} ` ( M O w.w.+ 3 9 5 . w.w.",
-"w.w.p #.9.8.6.4.=.o.<.>.;.&.$.@.o...} ` ( ^ H j p v z r 5 . w.w.",
-"w.w.w.g A / z y h 1 <.>.;.&.$.@.o...} ` ( ^ R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.o...} ` ( ^ R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.X.' ] ` ( ^ R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.L 5 9 ; 3 7 A R I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.+.0 w.w.w.w.w.> V I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&. .0 w.w.w.w.w.w.s I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.e w.w.w.w.w.w.x I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$._ 5 w.w.w.w.w.G I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i <.>.;.&.$.@.G w.w.w.w.6 P I F B z r 5 . w.w.",
-"w.w.w.w.w.w.w.w.w.i ,.:.*.%.#.O.[ w w.w.w.- U K D N l q ; . w.w.",
-"w.w.w.w.w.w.w.w.w.w e 0 0 0 0 9 6 & w.w.w., 3 % % # # # . o w.w."
-};
View
21 src/bitmaps/diamond.xpm
@@ -1,21 +0,0 @@
-/* XPM */
-static const char *diamond[]={
-"16 16 2 1",
-". c None",
-"# c #0000c0",
-"......####......",
-".....######.....",
-"....###..###....",
-"...###....###...",
-"..###......###..",
-".###........###.",
-"###....##....###",
-"##....####....##",
-"##....####....##",
-"###....##....###",
-".###........###.",
-"..###......###..",
-"...###....###...",
-"....###..###....",
-".....######.....",
-"......####......"};
View
BIN src/bitmaps/donate.png
Deleted file not rendered
View
BIN src/bitmaps/down.png
Deleted file not rendered
View
277 src/bitmaps/down.xpm
@@ -1,277 +0,0 @@
-/* XPM */
-static const char *down[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 239 2",
-" c #004C00",
-". c #004D00",
-"X c #024F02",
-"o c #005200",
-"O c #005600",
-"+ c #005700",
-"@ c #045004",
-"# c #005A01",
-"$ c #005C00",
-"% c #055F06",
-"& c #0A560A",
-"* c #125A12",
-"= c #175E17",
-"- c #006000",
-"; c #006100",
-": c #006300",
-"> c #006600",
-", c #056106",
-"< c #006901",
-"1 c #006A00",
-"2 c #006802",
-"3 c #006803",
-"4 c #006E00",
-"5 c #006E01",
-"6 c #086308",
-"7 c #0D650E",
-"8 c #0D670E",
-"9 c #007000",
-"0 c #007001",
-"q c #007400",
-"w c #007401",
-"e c #007601",
-"r c #017704",
-"t c #007800",
-"y c #007B00",
-"u c #007A01",
-"i c #007803",
-"p c #007903",
-"a c #007E00",
-"s c #017E01",
-"d c #007C03",
-"f c #007F03",
-"g c #057608",
-"h c #08700A",
-"j c #0D740E",
-"k c #166116",
-"l c #176917",
-"z c #186818",
-"x c #1A711A",
-"c c #1B7B1B",
-"v c #245F24",
-"b c #246724",
-"n c #237023",
-"m c #2C782E",
-"M c #307C30",
-"N c #387438",
-"B c #387A38",
-"V c #397A39",
-"C c #008200",
-"Z c #008103",
-"A c #008203",
-"S c #008303",
-"D c #008600",
-"F c #008700",
-"G c #008503",
-"H c #008504",
-"J c #028506",
-"K c #008900",
-"L c #008803",
-"P c #008C00",
-"I c #008804",
-"U c #008B04",
-"Y c #078C07",
-"T c #08870C",
-"R c #048B08",
-"E c #009000",
-"W c #009100",
-"Q c #009300",
-"! c #009400",
-"~ c #009600",
-"^ c #009700",
-"/ c #009B00",
-"( c #009E00",
-") c #009F00",
-"_ c #089809",
-"` c #0D980E",
-"' c #13950C",
-"] c #0E8811",
-"[ c #0C8F12",
-"{ c #118112",
-"} c #118714",
-"| c #1C831C",
-" . c #1C8A1C",
-".. c #139517",
-"X. c #149E15",
-"o. c #1A901A",
-"O. c #1B971B",
-"+. c #1B9D1B",
-"@. c #199A1C",
-"#. c #1C9B1D",
-"$. c #199C1C",
-"%. c #1B9F1D",
-"&. c #00A000",
-"*. c #00A300",
-"=. c #00A400",
-"-. c #00A500",
-";. c #00A600",
-":. c #00A700",
-">. c #00A900",
-",. c #00AB00",
-"<. c #00AD00",
-"1. c #00AE00",
-"2. c #02AC02",
-"3. c #08A009",
-"4. c #0BA60C",
-"5. c #0AAB0A",
-"6. c #0CAD0D",
-"7. c #00B100",
-"8. c #00B200",
-"9. c #00B300",
-"0. c #00B400",
-"q. c #00B500",
-"w. c #00B600",
-"e. c #00BB00",
-"r. c #00BD00",
-"t. c #00BE00",
-"y. c #00BF00",
-"u. c #13A514",
-"i. c #15A717",
-"p. c #14AC16",
-"a. c #17A219",
-"s. c #1AA01C",
-"d. c #1CA21C",
-"f. c #1EA51E",