~ubuntu-branches/ubuntu/maverick/newsbeuter/maverick

« back to all changes in this revision

Viewing changes to include/formaction.h

  • Committer: Bazaar Package Importer
  • Author(s): Nico Golde
  • Date: 2009-04-21 14:06:18 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090421140618-osnjk19bgkebyg9h
Tags: 2.0-1
* New upstream release.
  - Remove dependeny on mrss and nxml and add libxml2, newsbeuter
    now comes with its own parser.
  - Remove debian/patches and quilt dependency.
* Bump to policy 3.8.1, no changes needed.
* debian/copyright: adjust years.
* Remove dh_clean -k call as it is deprecated -> dh_prep.
* Change newsbeuter homepage, it now has an official one.
* Fix watch file url, new upstream code location.
* Add bookmark-scuttle.sh to installed contrib files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
                virtual ~formaction();
27
27
                virtual void prepare() = 0;
28
28
                virtual void init() = 0;
29
 
                stfl::form * get_form();
30
 
                inline void set_redraw(bool b) { do_redraw = b; }
 
29
                std::tr1::shared_ptr<stfl::form> get_form();
 
30
                virtual void set_redraw(bool b) { do_redraw = b; }
31
31
 
32
32
                virtual keymap_hint_entry * get_keymap_hint() = 0;
33
33
 
48
48
                inline std::string get_qna_response(unsigned int i) { return (qna_responses.size() >= (i + 1)) ? qna_responses[i] : ""; }
49
49
                void start_qna(const std::vector<qna_pair>& prompts, operation finish_op, history * h = NULL);
50
50
 
 
51
                inline void set_parent_formaction(std::tr1::shared_ptr<formaction> fa) { parent_formaction = fa; }
 
52
                inline std::tr1::shared_ptr<formaction> get_parent_formaction() { return parent_formaction; }
 
53
 
 
54
                virtual std::string title() = 0;
 
55
                
 
56
                virtual std::vector<std::string> get_suggestions(const std::string& fragment);
 
57
 
 
58
                static void load_histories(const std::string& searchfile, const std::string& cmdlinefile);
 
59
                static void save_histories(const std::string& searchfile, const std::string& cmdlinefile, unsigned int limit);
 
60
 
51
61
        protected:
52
62
                virtual void process_operation(operation op, bool automatic = false, std::vector<std::string> * args = NULL) = 0;
53
63
                virtual void set_keymap_hints();
56
66
                void start_bookmark_qna(const std::string& default_title, const std::string& default_url, const std::string& default_desc);
57
67
 
58
68
                view * v;
59
 
                stfl::form * f;
 
69
                std::tr1::shared_ptr<stfl::form> f;
60
70
                bool do_redraw;
61
71
 
62
72
                std::vector<std::string> qna_responses;
64
74
                static history searchhistory;
65
75
                static history cmdlinehistory;
66
76
 
 
77
                std::vector<std::string> valid_cmds;
 
78
 
67
79
        private:
68
80
                std::string prepare_keymap_hint(keymap_hint_entry * hints);
69
81
                void start_next_question();
71
83
                std::vector<qna_pair> qna_prompts;
72
84
                operation finish_operation;
73
85
                history * qna_history;
 
86
                std::tr1::shared_ptr<formaction> parent_formaction;
74
87
};
75
88
 
76
89