~ubuntu-branches/ubuntu/hardy/newsbeuter/hardy-security

« back to all changes in this revision

Viewing changes to include/formaction.h

  • Committer: Bazaar Package Importer
  • Author(s): Nico Golde
  • Date: 2007-05-08 18:35:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070508183546-kxo88s8lrtdyz3gv
Tags: 0.4-1
* New upstream release.
* Removed dpatch dependency and patch for header inclusion,
  included upstream.
* Changed Build-Dependencies to nxml >= 0.17.2 and mrss >= 0.17.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef NEWSBEUTER_FORMACTION__H
 
2
#define NEWSBEUTER_FORMACTION__H
 
3
 
 
4
#include <stflpp.h>
 
5
#include <keymap.h>
 
6
#include <rss.h>
 
7
 
 
8
#include <vector>
 
9
#include <string>
 
10
 
 
11
namespace newsbeuter {
 
12
 
 
13
class view;
 
14
 
 
15
struct keymap_hint_entry {
 
16
        operation op; 
 
17
        char * text;
 
18
};
 
19
 
 
20
class formaction {
 
21
        public:
 
22
                formaction(view *, std::string formstr);
 
23
                virtual ~formaction();
 
24
                virtual void process_operation(operation op) = 0;
 
25
                virtual void prepare() = 0;
 
26
                virtual void init() = 0;
 
27
                stfl::form * get_form();
 
28
                inline void set_redraw(bool b) { do_redraw = b; }
 
29
 
 
30
                virtual keymap_hint_entry * get_keymap_hint() = 0;
 
31
 
 
32
                virtual std::string get_value(const std::string& value);
 
33
 
 
34
        protected:
 
35
                virtual void set_keymap_hints();
 
36
 
 
37
                view * v;
 
38
                stfl::form * f;
 
39
                bool do_redraw;
 
40
 
 
41
        private:
 
42
                std::string prepare_keymap_hint(keymap_hint_entry * hints);
 
43
};
 
44
 
 
45
 
 
46
}
 
47
 
 
48
 
 
49
 
 
50
#endif