File: horhints.h

package info (click to toggle)
einstein 2.0.dfsg.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,164 kB
  • ctags: 1,652
  • sloc: cpp: 10,429; makefile: 118; sh: 1
file content (41 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (6)
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
#ifndef __HORHINTS_H__
#define __HORHINTS_H__


#include <vector>
#include "iconset.h"
#include "puzgen.h"
#include "widgets.h"



class HorHints: public Widget
{
    private:
        IconSet &iconSet;
        typedef std::vector<Rule*> RulesArr;
        RulesArr rules;
        RulesArr excludedRules;
        std::vector<int> numbersArr;
        bool showExcluded;
        int highlighted;
    
    public:
        HorHints(IconSet &is, Rules &rules);
        HorHints(IconSet &is, Rules &rules, std::istream &stream);

    public:
        virtual void draw();
        void drawCell(int col, int row, bool addToUpdate=true);
        virtual bool onMouseButtonDown(int button, int x, int y);
        void toggleExcluded();
        int getRuleNo(int x, int y);
        virtual bool onMouseMove(int x, int y);
        bool isActive(int ruleNo);
        void save(std::ostream &stream);
        void reset(Rules &rules);
};


#endif