ARB
Classes | Macros | Enumerations | Functions | Variables
GEN_map.cxx File Reference
#include "GEN_local.hxx"
#include "GEN_gene.hxx"
#include "GEN_graphic.hxx"
#include "GEN_nds.hxx"
#include "EXP_local.hxx"
#include <dbui.h>
#include <db_query.h>
#include <awt.hxx>
#include <awt_prompt.hxx>
#include <awt_input_mask.hxx>
#include <aw_preset.hxx>
#include <aw_awars.hxx>
#include <aw_question.hxx>
#include <AW_rename.hxx>
#include <aw_msg.hxx>
#include <aw_root.hxx>
#include <adGene.h>
#include <ad_cb.h>
#include <arb_progress.h>
#include <rootAsWin.h>
#include <mode_text.h>
#include <map>
Include dependency graph for GEN_map.cxx:

Go to the source code of this file.

Classes

class  GEN_map_window
 
class  GEN_map_manager
 
struct  gene_container_changed_cb_data
 
struct  EG2PS_data
 
class  GEN_unique_param
 
struct  GEN_command_mode_param
 
struct  GEN_extract_mode_param
 
struct  GEN_item_type_species_selector
 
struct  GEN_update_info
 

Macros

#define DISPLAY_TYPE_BIT(disp_type)   (1<<(disp_type))
 
#define ALL_DISPLAY_TYPES   (DISPLAY_TYPE_BIT(GEN_DISPLAY_STYLES)-1)
 

Enumerations

enum  GEN_PERFORM_MODE {
  GEN_PERFORM_ALL_ORGANISMS, GEN_PERFORM_CURRENT_ORGANISM, GEN_PERFORM_ALL_BUT_CURRENT_ORGANISM, GEN_PERFORM_MARKED_ORGANISMS,
  GEN_PERFORM_MODES
}
 
enum  GEN_MARK_MODE {
  GEN_MARK, GEN_UNMARK, GEN_INVERT_MARKED, GEN_COUNT_MARKED,
  GEN_EXTRACT_MARKED, GEN_MARK_HIDDEN, GEN_MARK_VISIBLE, GEN_UNMARK_HIDDEN,
  GEN_UNMARK_VISIBLE
}
 
enum  GEN_HIDE_MODE {
  GEN_HIDE_ALL, GEN_UNHIDE_ALL, GEN_INVERT_HIDE_ALL, GEN_HIDE_MARKED,
  GEN_UNHIDE_MARKED, GEN_INVERT_HIDE_MARKED
}
 
enum  MarkCommand { UNMARK, MARK, INVERT, MARK_UNMARK_REST }
 

Functions

 DECLARE_CBTYPE_FVV_AND_BUILDERS (GenmapWindowCallback, void, GEN_map_window *)
 
const charGEN_window_local_awar_name (const char *awar_name, int window_nr)
 
static void reinit_NDS_4_window (GEN_map_window *win)
 
static void GEN_NDS_changed (GBDATA *gb_viewkey)
 
static void GEN_gene_container_changed_cb (GBDATA *, gene_container_changed_cb_data *cb_data)
 
int GEN_find_windowNr_for (GEN_graphic *wanted_graphic)
 
GBDATAGEN_get_local_gene_data (GEN_graphic *gg)
 
static void GEN_gene_container_cb_installer (CbInstallMode install, AWT_canvas *gmw, GEN_graphic *gg)
 
static void GEN_jump_cb (AW_window *aww, bool force_center_if_fits)
 
static void GEN_jump_cb_auto (AW_root *root, GEN_map_window *win, bool force_refresh, bool force_zoom_reset)
 
static void GEN_local_organism_or_gene_name_changed_cb (AW_root *awr, GEN_map_window *win)
 
static void GEN_map_window_refresh (GEN_map_window *win)
 
void GEN_refresh_all_windows ()
 
static void GEN_map_window_refresh_if_display_type (GEN_map_window *win, bool zoom_reset, int display_type_mask)
 
static void GEN_update_unlocked_organism_and_gene_awars (GEN_map_window *win, const char *organismName, const char *geneName)
 
static void GEN_organism_or_gene_changed_cb (AW_root *awr)
 
static void GEN_local_lock_changed_cb (AW_root *awr, GEN_map_window *win, bool gene_lock)
 
static void GEN_display_param_changed_cb (AW_root *, bool zoom_reset, int display_type_mask)
 
void set_display_update_callback (AW_root *awr, const char *awar_name, bool zoom_reset, int display_type_mask)
 
static void GEN_create_genemap_local_awars (AW_root *aw_root, AW_default, int window_nr)
 
static void GEN_add_local_awar_callbacks (AW_root *awr, AW_default, GEN_map_window *win)
 
static void GEN_create_genemap_global_awars (AW_root *aw_root, AW_default def, GBDATA *gb_main)
 
static void GEN_add_global_awar_callbacks (AW_root *awr)
 
static void GEN_mode_event (AW_window *aws, GEN_map_window *win, AWT_COMMAND_MODE mode)
 
static void GEN_undo_cb (AW_window *, GB_UNDO_TYPE undo_type, GBDATA *gb_main)
 
static AW_windowGEN_create_options_window (AW_root *awr)
 
static AW_windowGEN_create_gc_window (AW_root *awr, AW_gc_manager *gcman)
 
string performmode_relative_id (const char *id, GEN_PERFORM_MODE pmode)
 
bool nameIsUnique (const char *short_name, GBDATA *gb_species_data)
 
static GB_ERROR GEN_species_add_entry (GBDATA *gb_pseudo, const char *key, const char *value)
 
static const charreadACC (GBDATA *gb_species_data, const char *name)
 
static void gen_extract_gene_2_pseudoSpecies (GBDATA *gb_species, GBDATA *gb_gene, EG2PS_data *eg2ps)
 
static void do_mark_command_for_one_species (int imode, GBDATA *gb_species, AW_CL cl_user)
 
static void do_hide_command_for_one_species (int imode, GBDATA *gb_species, AW_CL)
 
static void GEN_perform_command (GBDATA *gb_main, GEN_PERFORM_MODE pmode, void(*do_command)(int cmode, GBDATA *gb_species, AW_CL cl_user), int mode, AW_CL cl_user)
 
static void GEN_hide_command (AW_window *, GEN_PERFORM_MODE perform_mode, GEN_command_mode_param *param)
 
static void GEN_mark_command (AW_window *, GEN_PERFORM_MODE perform_mode, GEN_command_mode_param *param)
 
static GB_ERROR gene_extract_handler (const char *ali, GEN_extract_mode_param *param)
 
static void gene_extract_cb (AW_window *, GEN_extract_mode_param *param)
 
static void mark_organisms (AW_window *, MarkCommand mark, GBDATA *gb_main)
 
static void mark_gene_species (AW_window *, MarkCommand mark, GBDATA *gb_main)
 
static void mark_gene_species_of_marked_genes (AW_window *, GBDATA *gb_main)
 
static void mark_organisms_with_marked_genes (AW_window *, GBDATA *gb_main)
 
static void mark_gene_species_using_current_alignment (AW_window *, GBDATA *gb_main)
 
static void mark_genes_of_marked_gene_species (AW_window *, GBDATA *gb_main)
 
static void GEN_insert_extract_submenu (AW_window_menu_modes *awm, GBDATA *gb_main, const char *macro_prefix, const char *submenu_name, const char *hot_key, const char *help_file)
 
static void GEN_insert_multi_submenu (AW_window_menu_modes *awm, const char *macro_prefix, const char *submenu_name, const char *hot_key, const char *help_file, void(*command)(AW_window *, GEN_PERFORM_MODE, GEN_command_mode_param *), GEN_command_mode_param *command_mode)
 
static void GEN_insert_mark_submenu (AW_window_menu_modes *awm, GBDATA *gb_main, const char *macro_prefix, const char *submenu_name, const char *hot_key, const char *help_file, GEN_MARK_MODE mark_mode)
 
static void GEN_insert_hide_submenu (AW_window_menu_modes *awm, GBDATA *gb_main, const char *macro_prefix, const char *submenu_name, const char *hot_key, const char *help_file, GEN_HIDE_MODE hide_mode)
 
static void GEN_open_mask_window (AW_window *aww, int id, GBDATA *gb_main)
 
static void GEN_create_mask_submenu (AW_window_menu_modes *awm, GBDATA *gb_main)
 
static AW_windowcreate_colorize_genes_window (AW_root *aw_root, GBDATA *gb_main)
 
static AW_windowcreate_colorize_organisms_window (AW_root *aw_root, GBDATA *gb_main)
 
static void GEN_create_organism_submenu (AW_window_menu_modes *awm, GBDATA *gb_main, bool submenu)
 
static void GEN_create_gene_species_submenu (AW_window_menu_modes *awm, GBDATA *gb_main, bool submenu)
 
void GEN_create_genes_submenu (AW_window_menu_modes *awm, GBDATA *gb_main, bool for_ARB_NTREE)
 
static void GEN_create_hide_submenu (AW_window_menu_modes *awm, GBDATA *gb_main)
 
static void GEN_set_display_style (AW_window *aww, GEN_DisplayStyle style)
 
static AW_windowGEN_create_map (AW_root *aw_root, GEN_create_map_param *param)
 
AW_windowGEN_create_first_map (AW_root *aw_root, GBDATA *gb_main)
 

Variables

static const charGEN_PERFORM_MODE_id [GEN_PERFORM_MODES]
 
static AW_repeated_question * ask_about_existing_gene_species = NULp
 
static AW_repeated_question * ask_to_overwrite_alignment = NULp
 
static long gen_count_marked_genes = 0
 
static
GEN_item_type_species_selector 
item_type_gene
 

Macro Definition Documentation

#define DISPLAY_TYPE_BIT (   disp_type)    (1<<(disp_type))
#define ALL_DISPLAY_TYPES   (DISPLAY_TYPE_BIT(GEN_DISPLAY_STYLES)-1)

Definition at line 373 of file GEN_map.cxx.

Referenced by GEN_add_global_awar_callbacks().

Enumeration Type Documentation

Enumerator
GEN_PERFORM_ALL_ORGANISMS 
GEN_PERFORM_CURRENT_ORGANISM 
GEN_PERFORM_ALL_BUT_CURRENT_ORGANISM 
GEN_PERFORM_MARKED_ORGANISMS 
GEN_PERFORM_MODES 

Definition at line 640 of file GEN_map.cxx.

Enumerator
GEN_MARK 
GEN_UNMARK 
GEN_INVERT_MARKED 
GEN_COUNT_MARKED 
GEN_EXTRACT_MARKED 
GEN_MARK_HIDDEN 
GEN_MARK_VISIBLE 
GEN_UNMARK_HIDDEN 
GEN_UNMARK_VISIBLE 

Definition at line 660 of file GEN_map.cxx.

Enumerator
GEN_HIDE_ALL 
GEN_UNHIDE_ALL 
GEN_INVERT_HIDE_ALL 
GEN_HIDE_MARKED 
GEN_UNHIDE_MARKED 
GEN_INVERT_HIDE_MARKED 

Definition at line 679 of file GEN_map.cxx.

Enumerator
UNMARK 
MARK 
INVERT 
MARK_UNMARK_REST 

Definition at line 1174 of file GEN_map.cxx.

Function Documentation

DECLARE_CBTYPE_FVV_AND_BUILDERS ( GenmapWindowCallback  ,
void  ,
GEN_map_window  
)
const char* GEN_window_local_awar_name ( const char awar_name,
int  window_nr 
)

Definition at line 167 of file GEN_map.cxx.

References GBS_global_string().

static void reinit_NDS_4_window ( GEN_map_window win)
static
static void GEN_NDS_changed ( GBDATA gb_viewkey)
static
static void GEN_gene_container_changed_cb ( GBDATA ,
gene_container_changed_cb_data cb_data 
)
static
int GEN_find_windowNr_for ( GEN_graphic wanted_graphic)
GBDATA* GEN_get_local_gene_data ( GEN_graphic gg)
inline
static void GEN_gene_container_cb_installer ( CbInstallMode  install,
AWT_canvas gmw,
GEN_graphic gg 
)
static
static void GEN_jump_cb ( AW_window aww,
bool  force_center_if_fits 
)
static
static void GEN_jump_cb_auto ( AW_root root,
GEN_map_window win,
bool  force_refresh,
bool  force_zoom_reset 
)
static
static void GEN_local_organism_or_gene_name_changed_cb ( AW_root awr,
GEN_map_window win 
)
static
static void GEN_map_window_refresh ( GEN_map_window win)
static
void GEN_refresh_all_windows ( )
static void GEN_map_window_refresh_if_display_type ( GEN_map_window win,
bool  zoom_reset,
int  display_type_mask 
)
static
static void GEN_update_unlocked_organism_and_gene_awars ( GEN_map_window win,
const char organismName,
const char geneName 
)
static
static void GEN_organism_or_gene_changed_cb ( AW_root awr)
static
static void GEN_local_lock_changed_cb ( AW_root awr,
GEN_map_window win,
bool  gene_lock 
)
static
static void GEN_display_param_changed_cb ( AW_root ,
bool  zoom_reset,
int  display_type_mask 
)
static
void set_display_update_callback ( AW_root awr,
const char awar_name,
bool  zoom_reset,
int  display_type_mask 
)
inline
static void GEN_create_genemap_local_awars ( AW_root aw_root,
AW_default  ,
int  window_nr 
)
static
static void GEN_add_local_awar_callbacks ( AW_root awr,
AW_default  ,
GEN_map_window win 
)
static
static void GEN_create_genemap_global_awars ( AW_root aw_root,
AW_default  def,
GBDATA gb_main 
)
static
static void GEN_add_global_awar_callbacks ( AW_root awr)
static
static void GEN_mode_event ( AW_window aws,
GEN_map_window win,
AWT_COMMAND_MODE  mode 
)
static
static void GEN_undo_cb ( AW_window ,
GB_UNDO_TYPE  undo_type,
GBDATA gb_main 
)
static
static AW_window* GEN_create_options_window ( AW_root awr)
static
static AW_window* GEN_create_gc_window ( AW_root awr,
AW_gc_manager gcman 
)
static

Definition at line 633 of file GEN_map.cxx.

References AW_create_gc_window_named(), and NULp.

Referenced by GEN_map_window::init().

string performmode_relative_id ( const char id,
GEN_PERFORM_MODE  pmode 
)
inline

Definition at line 656 of file GEN_map.cxx.

References GBS_global_string().

bool nameIsUnique ( const char short_name,
GBDATA gb_species_data 
)
inline

Definition at line 691 of file GEN_map.cxx.

References GBT_find_species_rel_species_data().

static GB_ERROR GEN_species_add_entry ( GBDATA gb_pseudo,
const char key,
const char value 
)
static
static const char* readACC ( GBDATA gb_species_data,
const char name 
)
static
static void gen_extract_gene_2_pseudoSpecies ( GBDATA gb_species,
GBDATA gb_gene,
EG2PS_data eg2ps 
)
static
static void do_mark_command_for_one_species ( int  imode,
GBDATA gb_species,
AW_CL  cl_user 
)
static
static void do_hide_command_for_one_species ( int  imode,
GBDATA gb_species,
AW_CL   
)
static
static void GEN_perform_command ( GBDATA gb_main,
GEN_PERFORM_MODE  pmode,
void(*)(int cmode, GBDATA *gb_species, AW_CL cl_user)  do_command,
int  mode,
AW_CL  cl_user 
)
static
static void GEN_hide_command ( AW_window ,
GEN_PERFORM_MODE  perform_mode,
GEN_command_mode_param param 
)
static
static void GEN_mark_command ( AW_window ,
GEN_PERFORM_MODE  perform_mode,
GEN_command_mode_param param 
)
static
static GB_ERROR gene_extract_handler ( const char ali,
GEN_extract_mode_param param 
)
static
static void gene_extract_cb ( AW_window ,
GEN_extract_mode_param param 
)
static
static void mark_organisms ( AW_window ,
MarkCommand  mark,
GBDATA gb_main 
)
static
static void mark_gene_species ( AW_window ,
MarkCommand  mark,
GBDATA gb_main 
)
static
static void mark_gene_species_of_marked_genes ( AW_window ,
GBDATA gb_main 
)
static
static void mark_organisms_with_marked_genes ( AW_window ,
GBDATA gb_main 
)
static
static void mark_gene_species_using_current_alignment ( AW_window ,
GBDATA gb_main 
)
static
static void mark_genes_of_marked_gene_species ( AW_window ,
GBDATA gb_main 
)
static
static void GEN_insert_extract_submenu ( AW_window_menu_modes awm,
GBDATA gb_main,
const char macro_prefix,
const char submenu_name,
const char hot_key,
const char help_file 
)
static
static void GEN_insert_multi_submenu ( AW_window_menu_modes awm,
const char macro_prefix,
const char submenu_name,
const char hot_key,
const char help_file,
void(*)(AW_window *, GEN_PERFORM_MODE, GEN_command_mode_param *)  command,
GEN_command_mode_param command_mode 
)
static
static void GEN_insert_mark_submenu ( AW_window_menu_modes awm,
GBDATA gb_main,
const char macro_prefix,
const char submenu_name,
const char hot_key,
const char help_file,
GEN_MARK_MODE  mark_mode 
)
static
static void GEN_insert_hide_submenu ( AW_window_menu_modes awm,
GBDATA gb_main,
const char macro_prefix,
const char submenu_name,
const char hot_key,
const char help_file,
GEN_HIDE_MODE  hide_mode 
)
static
static void GEN_open_mask_window ( AW_window aww,
int  id,
GBDATA gb_main 
)
static
static void GEN_create_mask_submenu ( AW_window_menu_modes awm,
GBDATA gb_main 
)
static

Definition at line 1414 of file GEN_map.cxx.

References AWT_create_mask_submenu(), AWT_IT_GENE, and GEN_open_mask_window().

Referenced by GEN_create_genes_submenu().

static AW_window* create_colorize_genes_window ( AW_root aw_root,
GBDATA gb_main 
)
static

Definition at line 1418 of file GEN_map.cxx.

References QUERY::create_colorize_items_window(), and GEN_get_selector().

Referenced by GEN_create_genes_submenu().

static AW_window* create_colorize_organisms_window ( AW_root aw_root,
GBDATA gb_main 
)
static
static void GEN_create_organism_submenu ( AW_window_menu_modes awm,
GBDATA gb_main,
bool  submenu 
)
static
static void GEN_create_gene_species_submenu ( AW_window_menu_modes awm,
GBDATA gb_main,
bool  submenu 
)
static
void GEN_create_genes_submenu ( AW_window_menu_modes awm,
GBDATA gb_main,
bool  for_ARB_NTREE 
)
static void GEN_create_hide_submenu ( AW_window_menu_modes awm,
GBDATA gb_main 
)
static
static void GEN_set_display_style ( AW_window aww,
GEN_DisplayStyle  style 
)
static
static AW_window* GEN_create_map ( AW_root aw_root,
GEN_create_map_param param 
)
static
AW_window* GEN_create_first_map ( AW_root aw_root,
GBDATA gb_main 
)

Definition at line 1577 of file GEN_map.cxx.

References GEN_create_map().

Referenced by GEN_create_genes_submenu(), and popup_new_main_window().

Variable Documentation

const char* GEN_PERFORM_MODE_id[GEN_PERFORM_MODES]
static
Initial value:
= {
"org_all",
"org_current",
"org_butcur",
"org_marked",
}

Definition at line 649 of file GEN_map.cxx.

AW_repeated_question* ask_about_existing_gene_species = NULp
static

Definition at line 715 of file GEN_map.cxx.

Referenced by gene_extract_handler().

AW_repeated_question* ask_to_overwrite_alignment = NULp
static

Definition at line 716 of file GEN_map.cxx.

Referenced by gene_extract_handler().

long gen_count_marked_genes = 0
static

Definition at line 936 of file GEN_map.cxx.

Referenced by do_mark_command_for_one_species().

GEN_item_type_species_selector item_type_gene
static

Definition at line 1404 of file GEN_map.cxx.

Referenced by GEN_open_mask_window().