preferences.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. ktigcc - TIGCC IDE for KDE
  3. Copyright (C) 2004-2006 Kevin Kofler
  4. Copyright (C) 2006 Joey Adams
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  16. */
  17. typedef struct
  18. {
  19. unsigned char r,g,b;
  20. unsigned char reserved;
  21. } Syn_Color;
  22. #define SYNS_CUSTOM 1
  23. #define SYNS_BOLD 2
  24. #define SYNS_UNDERLINE 4
  25. #define SYNS_ITALIC 8
  26. #define SYNS_STRIKEOUT 16
  27. typedef unsigned short Syn_Style;
  28. typedef struct
  29. {
  30. QString name;
  31. QString beginning;
  32. QString ending;
  33. char ignoreEndingAfter;
  34. char switchable;
  35. Syn_Color color;
  36. Syn_Style style;
  37. } Syn_CustomStyle;
  38. typedef struct
  39. {
  40. QString name;
  41. QString list; //Items are delimited by '\n' characters; blank lines are ignored.
  42. Syn_Color color;
  43. Syn_Style style;
  44. char caseSensitive;
  45. } Syn_WordList;
  46. typedef struct
  47. {
  48. char enabled;
  49. Syn_Color numberColor;
  50. Syn_Color symbolColor;
  51. QValueList<Syn_Color> parenthesisColors;
  52. Syn_Style numberStyle;
  53. Syn_Style symbolStyle;
  54. Syn_Style parenthesisStyle;
  55. QValueList<Syn_CustomStyle> customStyles;
  56. QValueList<Syn_WordList> wordLists;
  57. } Syn_SettingsForDoc;
  58. int SynToXML(Syn_SettingsForDoc &syn,const QString &destFileName);
  59. typedef struct
  60. {
  61. bool lazyLoading;
  62. unsigned short tabWidthC;
  63. unsigned short tabWidthAsm;
  64. Syn_SettingsForDoc synC;
  65. Syn_SettingsForDoc synS;
  66. Syn_SettingsForDoc synASM;
  67. Syn_SettingsForDoc synQLL;
  68. } TIGCCPrefs;
  69. void loadPreferences(TIGCCPrefs *prefs,KConfig *cfg);
  70. void savePreferences(TIGCCPrefs *prefs,KConfig *cfg);
  71. void defaultPreferences(TIGCCPrefs *prefs);