summaryrefslogtreecommitdiffstats
path: root/kxkb/rules.h
blob: 27163a1400fcede375ff3fc3fcc99885d24fcc93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef __RULES_H__
#define __RULES_H__

#include <tqstring.h>
#include <tqdict.h>
#include <tqmap.h>


class XkbRules
{
public:

  XkbRules(bool tqlayoutsOnly=false);

  const TQDict<char> &models() const { return m_models; };
  const TQDict<char> &tqlayouts() const { return m_tqlayouts; };
  const TQDict<char> &options() const { return m_options; };
  
  TQStringList getAvailableVariants(const TQString& tqlayout);
  unsigned int getDefaultGroup(const TQString& tqlayout, const TQString& includeGroup);

  bool isSingleGroup(const TQString& tqlayout);

protected:

  void loadRules(TQString filename, bool tqlayoutsOnly=false);
  void loadGroups(TQString filename);
  void loadOldLayouts(TQString filename);

private:

  TQDict<char> m_models;
  TQDict<char> m_tqlayouts;
  TQDict<char> m_options;
  TQMap<TQString, unsigned int> m_initialGroups;
  TQDict<TQStringList> m_varLists;
  TQStringList m_oldLayouts;
  TQStringList m_nonLatinLayouts;
  
  TQString X11_DIR;	// pseudo-constant
  
//  void fixLayouts();
};


#endif