ARB
Macros | Enumerations | Functions | Variables
SEC_main.cxx File Reference
#include "SEC_root.hxx"
#include "SEC_graphic.hxx"
#include "SEC_helix.hxx"
#include "SEC_drawn_pos.hxx"
#include "SEC_toggle.hxx"
#include <BufferedFileReader.h>
#include <aw_awars.hxx>
#include <aw_preset.hxx>
#include <aw_file.hxx>
#include <aw_msg.hxx>
#include <aw_root.hxx>
#include <aw_question.hxx>
#include <mode_text.h>
#include <arb_file.h>
#include <awt_config_manager.hxx>
#include <ad_cb_prot.h>
Include dependency graph for SEC_main.cxx:

Go to the source code of this file.

Macros

#define ASS   "ARB secondary structure v1"
 
#define ASS_START   "[" ASS "]"
 
#define ASS_EOS   "[end of structure]"
 
#define ASS_EOF   "[end of " ASS "]"
 

Enumerations

enum  SyncColors { COLOR_SYNC_SEARCH = 1, COLOR_SYNC_RANGE = 2, COLOR_SYNC_REST = 4, COLOR_SYNC_ALL = (COLOR_SYNC_SEARCH|COLOR_SYNC_RANGE|COLOR_SYNC_REST) }
 

Functions

static void SEC_toggle_cb (AW_window *, const SEC_db_interface *db)
 
static void SEC_center_cb (AW_window *, SEC_root *root)
 
static void SEC_fit_window_cb (AW_window *, const SEC_db_interface *db)
 
static void sec_mode_event (AW_window *aws, SEC_root *sec_root, AWT_COMMAND_MODE mode)
 
static void SEC_undo_cb (AW_window *, const SEC_db_interface *db, GB_UNDO_TYPE undo_type)
 
static void export_structure_to_file (AW_window *, const SEC_db_interface *db)
 
GB_ERROR expectedError (const char *expected)
 
GB_ERROR expectContent (LineReader &file, const char *expected)
 
static string scanToken (LineReader &file, string &rest, GB_ERROR &error)
 
static GB_ERROR expectToken (LineReader &file, const char *token, string &content)
 
static void import_structure_from_file (AW_window *, const SEC_db_interface *db)
 
static AW_windowSEC_importExport (AW_root *root, bool export_to_file, const SEC_db_interface *db)
 
static void SEC_rename_structure (AW_window *, const SEC_db_interface *db)
 
static void SEC_new_structure (AW_window *, const SEC_db_interface *db)
 
static void SEC_delete_structure (AW_window *, const SEC_db_interface *db)
 
static void SEC_sync_colors (AW_window *aww, SyncColors which)
 
static AW_windowSEC_create_bonddef_window (AW_root *awr)
 
static AW_windowSEC_create_display_window (AW_root *awr)
 
static void SEC_exit (GBDATA *, SEC_root *sec_root)
 
static AW_windowSEC_create_gc_window (AW_root *awr, AW_gc_manager *gcman)
 
AW_windowstart_SECEDIT_plugin (ED4_plugin_host &host)
 

Variables

static AWT_config_mapping_def secedit_display_config_mapping []
 

Macro Definition Documentation

#define ASS   "ARB secondary structure v1"

Definition at line 242 of file SEC_main.cxx.

#define ASS_START   "[" ASS "]"

Definition at line 243 of file SEC_main.cxx.

Referenced by export_structure_to_file(), and import_structure_from_file().

#define ASS_EOS   "[end of structure]"

Definition at line 244 of file SEC_main.cxx.

Referenced by export_structure_to_file(), and import_structure_from_file().

#define ASS_EOF   "[end of " ASS "]"

Definition at line 245 of file SEC_main.cxx.

Referenced by export_structure_to_file(), and import_structure_from_file().

Enumeration Type Documentation

enum SyncColors
Enumerator
COLOR_SYNC_SEARCH 
COLOR_SYNC_RANGE 
COLOR_SYNC_REST 
COLOR_SYNC_ALL 

Definition at line 517 of file SEC_main.cxx.

Function Documentation

static void SEC_toggle_cb ( AW_window ,
const SEC_db_interface db 
)
static
static void SEC_center_cb ( AW_window ,
SEC_root root 
)
static

Definition at line 186 of file SEC_main.cxx.

References SEC_root::position_cursor().

Referenced by start_SECEDIT_plugin().

static void SEC_fit_window_cb ( AW_window ,
const SEC_db_interface db 
)
static

Definition at line 190 of file SEC_main.cxx.

References SEC_db_interface::canvas(), and AWT_canvas::request_zoom_reset().

Referenced by start_SECEDIT_plugin().

static void sec_mode_event ( AW_window aws,
SEC_root sec_root,
AWT_COMMAND_MODE  mode 
)
static
static void SEC_undo_cb ( AW_window ,
const SEC_db_interface db,
GB_UNDO_TYPE  undo_type 
)
static
static void export_structure_to_file ( AW_window ,
const SEC_db_interface db 
)
static
GB_ERROR expectedError ( const char expected)
inline

Definition at line 294 of file SEC_main.cxx.

References GBS_global_string().

Referenced by expectContent(), expectToken(), and import_structure_from_file().

GB_ERROR expectContent ( LineReader file,
const char expected 
)
inline

Definition at line 297 of file SEC_main.cxx.

References error(), expectedError(), LineReader::getLine(), line, and NULp.

Referenced by import_structure_from_file().

static string scanToken ( LineReader file,
string rest,
GB_ERROR error 
)
static

Definition at line 306 of file SEC_main.cxx.

References LineReader::getLine(), line, and sec_assert.

Referenced by expectToken(), and import_structure_from_file().

static GB_ERROR expectToken ( LineReader file,
const char token,
string content 
)
static

Definition at line 329 of file SEC_main.cxx.

References error(), expectedError(), NULp, and scanToken().

Referenced by import_structure_from_file().

static void import_structure_from_file ( AW_window ,
const SEC_db_interface db 
)
static
static AW_window* SEC_importExport ( AW_root root,
bool  export_to_file,
const SEC_db_interface db 
)
static
static void SEC_rename_structure ( AW_window ,
const SEC_db_interface db 
)
static
static void SEC_new_structure ( AW_window ,
const SEC_db_interface db 
)
static
static void SEC_delete_structure ( AW_window ,
const SEC_db_interface db 
)
static
static void SEC_sync_colors ( AW_window aww,
SyncColors  which 
)
static
static AW_window* SEC_create_bonddef_window ( AW_root awr)
static
static AW_window* SEC_create_display_window ( AW_root awr)
static
static void SEC_exit ( GBDATA ,
SEC_root sec_root 
)
static

Definition at line 712 of file SEC_main.cxx.

Referenced by start_SECEDIT_plugin().

static AW_window* SEC_create_gc_window ( AW_root awr,
AW_gc_manager gcman 
)
static

Definition at line 717 of file SEC_main.cxx.

References AW_create_gc_window_named().

Referenced by start_SECEDIT_plugin().

AW_window* start_SECEDIT_plugin ( ED4_plugin_host host)

Variable Documentation

AWT_config_mapping_def secedit_display_config_mapping[]
static
Initial value:
= {
{ AWAR_SECEDIT_HIDE_BASES, "hidebases" },
{ AWAR_SECEDIT_DIST_BETW_STRANDS, "stranddist" },
{ AWAR_SECEDIT_SHOW_BONDS, "showbonds" },
{ AWAR_SECEDIT_BOND_SYMBOLS_EDIT4, "bondsymbol_edit4" },
{ AWAR_SECEDIT_BOND_SYMBOLS_TRANS, "bondsymbol_trans" },
{ AWAR_SECEDIT_BOND_THICKNESS, "bondthickness" },
{ AWAR_SECEDIT_SHOW_CURPOS, "showposition" },
{ AWAR_SECEDIT_SHOW_HELIX_NRS, "showhelixnrs" },
{ AWAR_SECEDIT_SHOW_ECOLI_POS, "showecolipos" },
{ AWAR_SECEDIT_DISPLAY_SEARCH, "showsearch" },
{ AWAR_SECEDIT_DISPLAY_SAI, "showsai" },
{ AWAR_SECEDIT_DISPPOS_BINDING, "disppos_helix" },
{ AWAR_SECEDIT_DISPPOS_ECOLI, "disppos_ecoli" },
{ AWAR_SECEDIT_SKELETON_THICKNESS, "skeleton_thickness" },
{ NULp, NULp }
}
#define AWAR_SECEDIT_SHOW_CURPOS
Definition: SEC_db.hxx:41
#define AWAR_SECEDIT_SKELETON_THICKNESS
Definition: SEC_db.hxx:33
#define AWAR_SECEDIT_DISPLAY_SEARCH
Definition: SEC_db.hxx:43
#define AWAR_SECEDIT_BOND_THICKNESS
Definition: SEC_db.hxx:34
#define AWAR_SECEDIT_SHOW_STR_SKELETON
Definition: SEC_db.hxx:38
#define AWAR_SECEDIT_HIDE_BASES
Definition: SEC_db.hxx:39
#define AWAR_SECEDIT_SHOW_ECOLI_POS
Definition: SEC_db.hxx:37
#define AWAR_SECEDIT_SHOW_BONDS
Definition: SEC_db.hxx:40
#define AWAR_SECEDIT_SHOW_HELIX_NRS
Definition: SEC_db.hxx:36
#define AWAR_SECEDIT_DIST_BETW_STRANDS
Definition: SEC_db.hxx:32
#define AWAR_SECEDIT_BOND_SYMBOLS_EDIT4
Definition: SEC_db.hxx:47
#define AWAR_SECEDIT_BOND_SYMBOLS_TRANS
Definition: SEC_db.hxx:48
#define AWAR_SECEDIT_DISPLAY_SAI
Definition: SEC_db.hxx:42
#define AWAR_SECEDIT_DISPPOS_ECOLI
Definition: SEC_db.hxx:45
#define NULp
Definition: cxxforward.h:116
#define AWAR_SECEDIT_DISPPOS_BINDING
Definition: SEC_db.hxx:44

Definition at line 581 of file SEC_main.cxx.