| 1 | // ================================================================= // |
|---|
| 2 | // // |
|---|
| 3 | // File : ed4_plugins.hxx // |
|---|
| 4 | // Purpose : interface for edit4 plugins // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in September 2010 // |
|---|
| 7 | // Institute of Microbiology (Technical University Munich) // |
|---|
| 8 | // http://www.arb-home.de/ // |
|---|
| 9 | // // |
|---|
| 10 | // ================================================================= // |
|---|
| 11 | |
|---|
| 12 | #ifndef ED4_PLUGINS_HXX |
|---|
| 13 | #define ED4_PLUGINS_HXX |
|---|
| 14 | |
|---|
| 15 | #ifndef AW_BASE_HXX |
|---|
| 16 | #include <aw_base.hxx> |
|---|
| 17 | #endif |
|---|
| 18 | |
|---|
| 19 | class AW_event; |
|---|
| 20 | |
|---|
| 21 | struct ED4_plugin_host { |
|---|
| 22 | // interface provided for EDIT4 plugins (SECEDIT and RNA3D) |
|---|
| 23 | |
|---|
| 24 | virtual ~ED4_plugin_host() {} |
|---|
| 25 | |
|---|
| 26 | virtual AW_root *get_application_root() const = 0; |
|---|
| 27 | virtual GBDATA *get_database() const = 0; |
|---|
| 28 | |
|---|
| 29 | virtual bool SAIs_visualized() const = 0; // == true -> SECEDIT visualizes SAIs |
|---|
| 30 | virtual const char *get_SAI_background(int start, int end) const = 0; // get SAI background color |
|---|
| 31 | virtual const char *get_search_background(int start, int end) const = 0; // get background color of search hits |
|---|
| 32 | |
|---|
| 33 | virtual int get_base_position(int seq_position) const = 0; // transform seq-pos(gaps, [0..N]!) to base-pos(nogaps, [0..N]!) |
|---|
| 34 | |
|---|
| 35 | virtual void forward_event(AW_event *event) const = 0; // all events not handled by SECEDIT are forwarded here |
|---|
| 36 | |
|---|
| 37 | virtual void announce_current_species(const char *species_name) = 0; |
|---|
| 38 | }; |
|---|
| 39 | |
|---|
| 40 | typedef AW_window *ED4_plugin(ED4_plugin_host&); |
|---|
| 41 | |
|---|
| 42 | #if defined(IN_ARB_EDIT4) |
|---|
| 43 | void ED4_start_plugin(AW_window *aw, GBDATA *gb_main, const char *pluginname); |
|---|
| 44 | #endif // IN_ARB_EDIT4 |
|---|
| 45 | |
|---|
| 46 | #else |
|---|
| 47 | #error ed4_plugins.hxx included twice |
|---|
| 48 | #endif // ED4_PLUGINS_HXX |
|---|