ARB
Classes | Macros | Functions | Variables
GEN_interface.cxx File Reference
#include "GEN_local.hxx"
#include <db_scanner.hxx>
#include <db_query.h>
#include <dbui.h>
#include <item_sel_list.h>
#include <info_window.h>
#include <awt_sel_boxes.hxx>
#include <awt_prompt.hxx>
#include <aw_awar_defs.hxx>
#include <aw_root.hxx>
#include <aw_msg.hxx>
#include <aw_question.hxx>
#include <adGene.h>
#include <Location.h>
#include <arb_strarray.h>
#include <arb_strbuf.h>
Include dependency graph for GEN_interface.cxx:

Go to the source code of this file.

Classes

class  LocationEditor
 

Macros

#define AWAR_GENE_DEST   "tmp/gene/dest"
 
#define AD_F_ALL   AWM_ALL
 
#define GLE_POS1   "pos1"
 
#define GLE_POS2   "pos2"
 
#define GLE_CERT1   "cert1"
 
#define GLE_CERT2   "cert2"
 
#define GLE_COMPLEMENT   "complement"
 
#define GLE_JOINABLE   "joinable"
 
#define GLE_READABLE   "location"
 
#define GLE_STATUS   "status"
 

Functions

static void GEN_select_gene (GBDATA *, AW_root *aw_root, const char *item_name)
 
static chargen_get_gene_id (GBDATA *, GBDATA *gb_gene)
 
static GBDATAgen_find_gene_by_id (GBDATA *gb_main, const char *id)
 
GB_ERROR GEN_mark_organism_or_corresponding_organism (GBDATA *gb_species, int *)
 
void gen_restore_old_species_marks (GBDATA *gb_main)
 
static GBDATAGEN_get_first_gene_data (GBDATA *gb_main, AW_root *aw_root, QUERY_RANGE range)
 
static GBDATAGEN_get_next_gene_data (GBDATA *gb_gene_data, QUERY_RANGE range)
 
static GBDATAGEN_get_current_gene (GBDATA *gb_main, AW_root *aw_root)
 
static void add_selected_gene_changed_cb (AW_root *aw_root, const RootCallback &cb)
 
static GBDATAfirst_gene_in_range (GBDATA *gb_gene_data, QUERY_RANGE range)
 
static GBDATAnext_gene_in_range (GBDATA *gb_prev, QUERY_RANGE range)
 
static void refresh_displayed_genes ()
 
ItemSelectorGEN_get_selector ()
 
static void GEN_species_name_changed_cb (AW_root *awr, GBDATA *gb_main)
 
static void auto_select_pseudo_species (AW_root *awr, GBDATA *gb_main, const char *organism, const char *gene)
 
static void GEN_update_GENE_CONTENT (GBDATA *gb_main, AW_root *awr)
 
static void GEN_update_combined_cb (AW_root *awr, GBDATA *gb_main)
 
void GEN_create_awars (AW_root *aw_root, AW_default aw_def, GBDATA *gb_main)
 
GBDATAGEN_get_current_organism (GBDATA *gb_main)
 
static GBDATAget_current_gene_data (GBDATA *gb_main)
 
static GB_ERROR gene_rename_handler (const char *dest, GBDATA *gb_main)
 
static GB_ERROR gene_copy_handler (const char *dest, GBDATA *gb_main)
 
static void gene_rename_cb (AW_window *aww, GBDATA *gb_main)
 
static void gene_copy_cb (AW_window *aww, GBDATA *gb_main)
 
const charelemOr (ConstStrArray &a, size_t i, const char *Default)
 
char elemOr (const char *a, size_t len, size_t i, char Default)
 
GB_ERROR update_location_from_GEN_position (LocationEditor *loced, const GEN_position *gp)
 
static void GLE_update_from_detailFields (AW_root *, LocationEditor *loced)
 
static SmartCharPtr sizetarray2string (const size_t *array, int size)
 
SmartCharPtr dupSizedPart (const unsigned char *in, int size)
 
SmartCharPtr dupComplement (const unsigned char *in, int size)
 
static void GLE_update_from_location (AW_root *, LocationEditor *loced)
 
static void GLE_revcomp_cb (AW_window *, LocationEditor *loced)
 
static void gene_changed_cb (AW_root *aw_root, LocationEditor *loced)
 
static void boundloc_changed_cb (AW_root *aw_root, LocationEditor *loced)
 
static void gene_create_cb (AW_window *aww, GBDATA *gb_main, LocationEditor *loced)
 
static AW_windowget_gene_create_or_locationEdit_window (AW_root *root, bool createGene, GBDATA *gb_main)
 
static void popup_gene_location_editor (AW_window *aww, GBDATA *gb_main)
 
static AW_windowcreate_gene_create_window (AW_root *root, GBDATA *gb_main)
 
static void gene_delete_cb (AW_window *aww, GBDATA *gb_main)
 
static void GEN_create_field_items (AW_window *aws, GBDATA *gb_main)
 
static AW_windowpopup_new_gene_window (AW_root *aw_root, GBDATA *gb_main, int detach_id)
 
static void popup_detached_gene_window (AW_window *aw_parent, const InfoWindow *infoWin)
 
void GEN_popup_gene_infowindow (AW_root *aw_root, GBDATA *gb_main)
 
AW_windowGEN_create_gene_query_window (AW_root *aw_root, GBDATA *gb_main)
 

Variables

static charold_species_marks = NULp
 
static struct MutableItemSelector GEN_item_selector
 
static QUERY::DbQueryGLOBAL_gene_query = NULp
 
const int NAME_WIDTH = 33
 
const int POS_WIDTH = NAME_WIDTH
 
const int CER_WIDTH = POS_WIDTH/2
 
const int LOC_WIDTH = 53
 
static int loc_update_running = 0
 

Macro Definition Documentation

#define AWAR_GENE_DEST   "tmp/gene/dest"
#define AD_F_ALL   AWM_ALL

Definition at line 42 of file GEN_interface.cxx.

Referenced by GEN_create_field_items(), and popup_new_gene_window().

#define GLE_POS1   "pos1"
#define GLE_POS2   "pos2"
#define GLE_CERT1   "cert1"
#define GLE_CERT2   "cert2"
#define GLE_COMPLEMENT   "complement"
#define GLE_JOINABLE   "joinable"
#define GLE_READABLE   "location"
#define GLE_STATUS   "status"

Function Documentation

static void GEN_select_gene ( GBDATA ,
AW_root aw_root,
const char item_name 
)
static
static char* gen_get_gene_id ( GBDATA ,
GBDATA gb_gene 
)
static
static GBDATA* gen_find_gene_by_id ( GBDATA gb_main,
const char id 
)
static

Definition at line 70 of file GEN_interface.cxx.

References ARB_strdup(), GEN_find_gene(), GEN_find_organism(), NULp, and result.

GB_ERROR GEN_mark_organism_or_corresponding_organism ( GBDATA gb_species,
int  
)
void gen_restore_old_species_marks ( GBDATA gb_main)
inline

Definition at line 109 of file GEN_interface.cxx.

References GBT_restore_marked_species().

Referenced by GEN_get_first_gene_data(), and GEN_get_next_gene_data().

static GBDATA* GEN_get_first_gene_data ( GBDATA gb_main,
AW_root aw_root,
QUERY_RANGE  range 
)
static
static GBDATA* GEN_get_next_gene_data ( GBDATA gb_gene_data,
QUERY_RANGE  range 
)
static
static GBDATA* GEN_get_current_gene ( GBDATA gb_main,
AW_root aw_root 
)
static
static void add_selected_gene_changed_cb ( AW_root aw_root,
const RootCallback &  cb 
)
static
static GBDATA* first_gene_in_range ( GBDATA gb_gene_data,
QUERY_RANGE  range 
)
static
static GBDATA* next_gene_in_range ( GBDATA gb_prev,
QUERY_RANGE  range 
)
static
static void refresh_displayed_genes ( )
static

Definition at line 222 of file GEN_interface.cxx.

References GEN_refresh_all_windows().

ItemSelector& GEN_get_selector ( )
static void GEN_species_name_changed_cb ( AW_root awr,
GBDATA gb_main 
)
static
static void auto_select_pseudo_species ( AW_root awr,
GBDATA gb_main,
const char organism,
const char gene 
)
static
static void GEN_update_GENE_CONTENT ( GBDATA gb_main,
AW_root awr 
)
static
static void GEN_update_combined_cb ( AW_root awr,
GBDATA gb_main 
)
static
void GEN_create_awars ( AW_root aw_root,
AW_default  aw_def,
GBDATA gb_main 
)
GBDATA* GEN_get_current_organism ( GBDATA gb_main)
static GBDATA* get_current_gene_data ( GBDATA gb_main)
static
static GB_ERROR gene_rename_handler ( const char dest,
GBDATA gb_main 
)
static
static GB_ERROR gene_copy_handler ( const char dest,
GBDATA gb_main 
)
static
static void gene_rename_cb ( AW_window aww,
GBDATA gb_main 
)
static
static void gene_copy_cb ( AW_window aww,
GBDATA gb_main 
)
static
const char* elemOr ( ConstStrArray a,
size_t  i,
const char Default 
)
inline

Definition at line 552 of file GEN_interface.cxx.

References CharPtrArray::size().

Referenced by LocationEditor::create_GEN_position_from_fields().

char elemOr ( const char a,
size_t  len,
size_t  i,
char  Default 
)
inline

Definition at line 555 of file GEN_interface.cxx.

GB_ERROR update_location_from_GEN_position ( LocationEditor loced,
const GEN_position gp 
)
inline
static void GLE_update_from_detailFields ( AW_root ,
LocationEditor loced 
)
static
static SmartCharPtr sizetarray2string ( const size_t array,
int  size 
)
static
SmartCharPtr dupSizedPart ( const unsigned char in,
int  size 
)
inline

Definition at line 655 of file GEN_interface.cxx.

References ARB_strpartdup().

Referenced by GLE_update_from_location().

SmartCharPtr dupComplement ( const unsigned char in,
int  size 
)
inline

Definition at line 659 of file GEN_interface.cxx.

Referenced by GLE_update_from_location().

static void GLE_update_from_location ( AW_root ,
LocationEditor loced 
)
static
static void GLE_revcomp_cb ( AW_window ,
LocationEditor loced 
)
static

Definition at line 703 of file GEN_interface.cxx.

References LocationEditor::revcomp().

Referenced by LocationEditor::createEditFields().

static void gene_changed_cb ( AW_root aw_root,
LocationEditor loced 
)
static
static void boundloc_changed_cb ( AW_root aw_root,
LocationEditor loced 
)
static
static void gene_create_cb ( AW_window aww,
GBDATA gb_main,
LocationEditor loced 
)
static
static AW_window* get_gene_create_or_locationEdit_window ( AW_root root,
bool  createGene,
GBDATA gb_main 
)
static
static void popup_gene_location_editor ( AW_window aww,
GBDATA gb_main 
)
static
static AW_window* create_gene_create_window ( AW_root root,
GBDATA gb_main 
)
static

Definition at line 868 of file GEN_interface.cxx.

References get_gene_create_or_locationEdit_window().

Referenced by popup_new_gene_window().

static void gene_delete_cb ( AW_window aww,
GBDATA gb_main 
)
static
static void GEN_create_field_items ( AW_window aws,
GBDATA gb_main 
)
static
static AW_window * popup_new_gene_window ( AW_root aw_root,
GBDATA gb_main,
int  detach_id 
)
static
static void popup_detached_gene_window ( AW_window aw_parent,
const InfoWindow infoWin 
)
static
void GEN_popup_gene_infowindow ( AW_root aw_root,
GBDATA gb_main 
)
AW_window* GEN_create_gene_query_window ( AW_root aw_root,
GBDATA gb_main 
)

Variable Documentation

char* old_species_marks = NULp
static

Definition at line 107 of file GEN_interface.cxx.

struct MutableItemSelector GEN_item_selector
static
Initial value:
= {
-1,
"gene",
"genes",
"name",
}
ItemSelector & ORGANISM_get_selector()
Definition: species.cxx:140
static GBDATA * gen_find_gene_by_id(GBDATA *gb_main, const char *id)
static GBDATA * first_gene_in_range(GBDATA *gb_gene_data, QUERY_RANGE range)
GBDATA * GB_get_grandfather(GBDATA *gbd)
Definition: arbdb.cxx:1728
static GBDATA * GEN_get_first_gene_data(GBDATA *gb_main, AW_root *aw_root, QUERY_RANGE range)
static void add_selected_gene_changed_cb(AW_root *aw_root, const RootCallback &cb)
static GBDATA * next_gene_in_range(GBDATA *gb_prev, QUERY_RANGE range)
#define CHANGE_KEY_PATH_GENES
Definition: arbdbt.h:87
static GBDATA * GEN_get_next_gene_data(GBDATA *gb_gene_data, QUERY_RANGE range)
static void refresh_displayed_genes()
void gene_field_selection_list_update_cb(AW_window *, GBDATA *gb_main)
Definition: changekey.cxx:192
static char * gen_get_gene_id(GBDATA *, GBDATA *gb_gene)
static GBDATA * GEN_get_current_gene(GBDATA *gb_main, AW_root *aw_root)
static void GEN_select_gene(GBDATA *, AW_root *aw_root, const char *item_name)

Definition at line 226 of file GEN_interface.cxx.

Referenced by GEN_get_selector().

QUERY::DbQuery* GLOBAL_gene_query = NULp
static

Definition at line 379 of file GEN_interface.cxx.

const int NAME_WIDTH = 33

Definition at line 463 of file GEN_interface.cxx.

const int POS_WIDTH = NAME_WIDTH

Definition at line 464 of file GEN_interface.cxx.

const int CER_WIDTH = POS_WIDTH/2

Definition at line 465 of file GEN_interface.cxx.

const int LOC_WIDTH = 53

Definition at line 466 of file GEN_interface.cxx.

int loc_update_running = 0
static

Definition at line 609 of file GEN_interface.cxx.