Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MyFrame Class Reference

Frame class. More...

#include <MyFrame.h>

List of all members.

Public Member Functions

 MyFrame (wxWindow *parent, const wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, const long style)
 Constructor.
virtual ~MyFrame ()
 Destructor.
virtual void initme ()
 Initializes the frame.
virtual void rememberLastProject ()
 Stores the last open project for reopening on program start.
virtual wxString check4update ()
 Is a new version available online?
virtual void update2version (wxString ver)
 Download the new version of GENtle.
virtual wxMenu * getFileMenu (int options=0)
 Returns the standard File menu, with variations.
virtual wxMenu * getToolMenu (bool _pcr=false)
 Returns the standard Tools menu, with variations.
virtual wxMenu * getHelpMenu ()
 Returns the standard Help menu.
virtual void InitToolBar (wxToolBar *toolBar)
 Sets the icon size for the toolbar.
virtual void OnSize (wxSizeEvent &event)
 Handles OnSize events.
virtual void OnAbout (wxCommandEvent &event)
 Displays "About" text.
virtual void OnHelp (wxCommandEvent &event)
 Invokes help.
virtual void OnHomepage (wxCommandEvent &event)
 Invokes homepage.
virtual void OnProgramOptions (wxCommandEvent &event)
 Handles the Program Options menu event, and stores the options in the local database.
virtual void OnProjectSave (wxCommandEvent &event)
 Handles the Save Project menu event.
virtual void OnProjectLoad (wxCommandEvent &event)
 Handles the Load Project menu event.
virtual void OnProjectClose (wxCommandEvent &event)
 Handles the Close Project menu event.
virtual void OnImageViewer (wxCommandEvent &event)
 Invokes the image viewer module.
virtual void OnExternalInterface (wxCommandEvent &event)
 Creates a new external interface for NCBI/BLAST searching.
virtual void OnCalculator (wxCommandEvent &event)
 Handles the Calculator menu event by calling MyFrame::RunCalculator.
virtual void OnGraph (wxCommandEvent &event)
 Handles the Graph menu event by calling MyFrame::RunGraph.
virtual void OnLigation (wxCommandEvent &event)
virtual void OnCloningAssistant (wxCommandEvent &event)
virtual void OnSequencingAssistant (wxCommandEvent &event)
virtual void RerouteMenu (wxCommandEvent &event)
 Reroutes menu events from the frame to the active child.
virtual void OnlineTools (wxCommandEvent &event)
 Reroutes context menu events to online tools.
virtual void BollocksMenu (wxCommandEvent &event)
 Bug-patch function to catch illegal events.
virtual void TestMenu (wxCommandEvent &event)
 Handles the menu request for running the test suite.
virtual void OnMDIClose (wxCommandEvent &event)
 Closes MDI child via (Crtl-F4).
virtual void OnEnzymeEditor (wxCommandEvent &event)
 Invokes the enzyme editor.
virtual void OnAlignment (wxCommandEvent &event)
 Handles the Alignment menu event, calls MyFrame::runAlignment.
virtual void OnFileOpen (wxCommandEvent &event)
 Invokes the "open from database" dialog.
virtual void OnFileImport (wxCommandEvent &event)
 Handles the "import from file" dialog, then calls MyFrame::importFile.
virtual void OnManageDatabase (wxCommandEvent &event)
 Handles the Manage Database menu event.
virtual void OnTextImport (wxCommandEvent &event)
 Invokes the "enter sequence manually" dialog and calls the appropriate creation function.
virtual void OnQuit (wxCommandEvent &event)
 Handles the Quit command, closes.
virtual void OnClose (wxCloseEvent &event)
 Handles close event.
virtual void OnSashDrag (wxSashEvent &event)
 Handles SashDrag events (sash between the main tree and the current child.
virtual void updateCCP (ChildBase *c)
 Updates cut, copy, paste, find icons.
virtual void addTool (wxToolBar *toolBar, int id)
 Adds a tool to a given toolbar.
virtual void addDefaultTools (wxToolBar *toolBar)
 Adds default tools to a given toolbar.
virtual void addCCPFTools (wxToolBar *toolBar, bool findbutton=false)
 Adds cut,copy,paste (and find) tools to a given toolbar.
virtual void setDummyToolbar (ChildBase *c)
 Generates a basic tooblar.
virtual TCalculatorRunCalculator ()
 Invokes the calculator module.
virtual TGraphRunGraph ()
 Invokes the graph module.
virtual MyChildnewFromVector (TVector *nv, int type=TYPE_VECTOR)
 Creates a new DNA entry from a TVector structure.
virtual TAminoAcidsnewAminoAcids (wxString aa, wxString title=_T(""))
 Creates a new amino acid entry from a string.
virtual TAminoAcidsnewAminoAcids (TVector *nv, wxString title=_T(""))
 Creates a new amino acid entry from a TVector structure.
virtual TABIviewernewABI (wxString filename, wxString title)
 Creates a new sequencing entry from an ABI file.
virtual MyChildnewCLONE (TClone &clone)
 Creates a new entry from a CLONE import.
virtual void newGB (TGenBank &gb, wxString title=_T(""))
 Creates a new entry from a GenBank import.
virtual void newPDB (TPDB &pdb, wxString title=_T(""))
 Creates a new entry from a PDB import.
virtual void newXML (TXMLfile &xml, wxString title=_T(""))
 Creates a new entry from an XML file (GenBankXML; DNA or amino acids).
virtual TPhyloTreenewPhyloTree (wxString title=_T(""))
 Creates a new module with a phylogenetic tree.
virtual void blast (wxString seq, wxString prg)
 Runs a blast search by invoking MyFrame::OnExternalInterface.
virtual bool importFile (wxString file, wxString path, int filter=-1)
 Imports a file.
virtual void setChild (ChildBase *ch)
 Adds a child, if it is not already in the children list.
virtual void removeChild (ChildBase *ch)
 Safely removes a child from the children list.
virtual TStoragegetTempDB (wxString name)
 Creates a temporary database, or uses one from the cache.
virtual TAlignmentrunAlignment (wxArrayString &vs, wxArrayChildBase &vc, TVector *nv=NULL)
 Creates a new alignment window.
virtual ChildBaseGetActiveChild ()
 Returns pointer to last (active) child.
virtual void setActiveChild (ChildBase *c)
 Sets the active child.
virtual wxWindow * getCommonParent ()
 Returns the base window for all children.
virtual int getChildIndex (ChildBase *c)
 Gets the number of a child in the children list.
virtual void activateChild (int a)
 Activates a child (brings to front, makes visible, etc.).
virtual void lockDisplay (bool lock=true)
 Locks/unlocks display, counts (un)lock requests.
virtual bool isLocked ()
 Is display locked?
virtual bool isActivating ()
 Is a child activation sequence running?
virtual TVirtualGeluseGel (wxString type)
 Creates/reuses a virtual gel.
virtual void saveImage (wxBitmap *bmp, wxString name=_T(""))
 Saves an image (actually, a wxBitmap) to a file, with "save as" dialog.
virtual wxChoice * AddFontsizeTool (wxToolBar *toolBar, int id)
virtual void push_help (wxString name)
virtual void pop_help ()
virtual wxString get_help ()
virtual int count_help ()

Public Attributes

TMainTreemainTree
 The main tree (for sequences etc.).
TStorageLS
 Pointer to the local TStorage database structure.
bool dying
bool enhancedRefresh
bool showVectorTitle
bool showVectorLength
bool loadLastProject
bool useMetafile
bool showSplashScreen
bool checkUpdate
bool useCoolCanvas
bool useInternalHelp
bool doRegisterStuff
bool showEnzymePos
bool useTwoToolbars
bool useOnlineHelp
bool showToolTips
wxColour aa_color
int editFeatureMode
int showStopCodon
TProject project
 The current project.
TEnzymeRulesglobal_enzyme_rules
 The global rules for which enzymes to use/display.
wxString lang_string
 The user interface language name.
wxArrayString lastCocktail
 Enzymes of the last restriction cocktail.
wxArrayChildBase children
 List of pointers to all child windows.
wxHtmlEasyPrinting * html_ep
 HTML printer wrapper for TCalculator.
vector< wxBitmap > bitmaps
 The bitmaps in the user interface.
wxToolBar * tb_mychild
 The shared toolbar (?).
char stopcodon
int nonstandard_translation_table
wxArrayString dna_marker
wxToolBar * mainToolBar
 The main toolbar.
TOnlineToolsonline_tools

Private Member Functions

wxBitmap to_grey (wxBitmap &bmp1)

Private Attributes

wxSashLayoutWindow * m_topWindow
 Frame layout, top window (unused).
wxSashLayoutWindow * m_leftWindow1
 Frame layout, left window.
wxSashLayoutWindow * m_leftWindow2
 Frame layout, right window.
wxSashLayoutWindow * m_bottomWindow
 Frame layout, bottom window (unused).
wxArrayTStorage dbcache
 Cache of databases for faster access.
ChildBaselastChild
 Last child shown.
wxMenuBar * menu_bar
 The current menu bar.
int locked
 State of display locking.
bool activating
 In child activation?
vector< wxString > help_name


Detailed Description

Frame class.

This class contains the actually displayed frame, as well as several often-used functions.


Constructor & Destructor Documentation

MyFrame::MyFrame wxWindow *  parent,
const wxWindowID  id,
const wxString &  title,
const wxPoint &  pos,
const wxSize &  size,
const long  style
 

Constructor.

  • Initializes variables
  • Sets the accelerator keys

MyFrame::~MyFrame  )  [virtual]
 

Destructor.

  • Stores the last project used, so it can be reopened on the next program start
  • Clears memory


Member Function Documentation

void MyFrame::activateChild int  a  )  [virtual]
 

Activates a child (brings to front, makes visible, etc.).

Parameters:
a Number of child in children list

void MyFrame::addCCPFTools wxToolBar *  toolBar,
bool  findbutton = false
[virtual]
 

Adds cut,copy,paste (and find) tools to a given toolbar.

void MyFrame::addDefaultTools wxToolBar *  toolBar  )  [virtual]
 

Adds default tools to a given toolbar.

wxChoice * MyFrame::AddFontsizeTool wxToolBar *  toolBar,
int  id
[virtual]
 

void MyFrame::addTool wxToolBar *  toolBar,
int  id
[virtual]
 

Adds a tool to a given toolbar.

void MyFrame::blast wxString  seq,
wxString  prg
[virtual]
 

Runs a blast search by invoking MyFrame::OnExternalInterface.

void MyFrame::BollocksMenu wxCommandEvent &  event  )  [virtual]
 

Bug-patch function to catch illegal events.

wxString MyFrame::check4update  )  [virtual]
 

Is a new version available online?

This function is currently a mess, due to bugs in wxWidgets, but it basically works...

virtual int MyFrame::count_help  )  [inline, virtual]
 

wxString MyFrame::get_help  )  [virtual]
 

ChildBase * MyFrame::GetActiveChild  )  [virtual]
 

Returns pointer to last (active) child.

int MyFrame::getChildIndex ChildBase c  )  [virtual]
 

Gets the number of a child in the children list.

Parameters:
c Pointer to child

wxWindow * MyFrame::getCommonParent  )  [virtual]
 

Returns the base window for all children.

wxMenu * MyFrame::getFileMenu int  options = 0  )  [virtual]
 

Returns the standard File menu, with variations.

Parameters:
_save Include "Save" menu option
_exp Include "Export" menu option
_print Include "Print" menu option

wxMenu * MyFrame::getHelpMenu  )  [virtual]
 

Returns the standard Help menu.

TStorage * MyFrame::getTempDB wxString  name  )  [virtual]
 

Creates a temporary database, or uses one from the cache.

Parameters:
name Name of the database to use

wxMenu * MyFrame::getToolMenu bool  _pcr = false  )  [virtual]
 

Returns the standard Tools menu, with variations.

Parameters:
_pcr Include PCR menu option

bool MyFrame::importFile wxString  file,
wxString  path,
int  filter = -1
[virtual]
 

Imports a file.

If a "filter" number is given, only the matching file type is tried. If "filter" is not given (-1), it tries to detect the type by opening it with all import modules until there is a match.

void MyFrame::initme  )  [virtual]
 

Initializes the frame.

  • Creates frame layout
  • Accesses local database and imports enzyme list
  • Sets options
  • Loads language file
  • Checks for updates online (Windows only)
  • Menus
  • Initialized drop target
  • Loads bitmaps for user interface
  • Loads last project
  • Parses command line paramaters

void MyFrame::InitToolBar wxToolBar *  toolBar  )  [virtual]
 

Sets the icon size for the toolbar.

bool MyFrame::isActivating  )  [virtual]
 

Is a child activation sequence running?

bool MyFrame::isLocked  )  [virtual]
 

Is display locked?

void MyFrame::lockDisplay bool  lock = true  )  [virtual]
 

Locks/unlocks display, counts (un)lock requests.

Parameters:
lock Lock if true, unlock if not

TABIviewer * MyFrame::newABI wxString  filename,
wxString  title
[virtual]
 

Creates a new sequencing entry from an ABI file.

TAminoAcids * MyFrame::newAminoAcids TVector nv,
wxString  title = _T("")
[virtual]
 

Creates a new amino acid entry from a TVector structure.

This function basically does the same as MyFrame::newFromVector, but for amino acid sequences instead of DNA

TAminoAcids * MyFrame::newAminoAcids wxString  aa,
wxString  title = _T("")
[virtual]
 

Creates a new amino acid entry from a string.

MyChild * MyFrame::newCLONE TClone clone  )  [virtual]
 

Creates a new entry from a CLONE import.

MyChild * MyFrame::newFromVector TVector nv,
int  type = TYPE_VECTOR
[virtual]
 

Creates a new DNA entry from a TVector structure.

This is a very important function. Virtually all import/open/enter functions call this one to create the actual window containing that data.

void MyFrame::newGB TGenBank gb,
wxString  title = _T("")
[virtual]
 

Creates a new entry from a GenBank import.

This function can actually open multiple sequences from one and the same GenBank structure. This is used, for example, when opening alignments.

void MyFrame::newPDB TPDB pdb,
wxString  title = _T("")
[virtual]
 

Creates a new entry from a PDB import.

TPhyloTree * MyFrame::newPhyloTree wxString  title = _T("")  )  [virtual]
 

Creates a new module with a phylogenetic tree.

void MyFrame::newXML TXMLfile xml,
wxString  title = _T("")
[virtual]
 

Creates a new entry from an XML file (GenBankXML; DNA or amino acids).

void MyFrame::OnAbout wxCommandEvent &  event  )  [virtual]
 

Displays "About" text.

void MyFrame::OnAlignment wxCommandEvent &  event  )  [virtual]
 

Handles the Alignment menu event, calls MyFrame::runAlignment.

void MyFrame::OnCalculator wxCommandEvent &  event  )  [virtual]
 

Handles the Calculator menu event by calling MyFrame::RunCalculator.

void MyFrame::OnCloningAssistant wxCommandEvent &  event  )  [virtual]
 

void MyFrame::OnClose wxCloseEvent &  event  )  [virtual]
 

Handles close event.

Scans through all the children; if any one is changed, ask the user the darn "are you sure" question, unless in debugging mode

void MyFrame::OnEnzymeEditor wxCommandEvent &  event  )  [virtual]
 

Invokes the enzyme editor.

void MyFrame::OnExternalInterface wxCommandEvent &  event  )  [virtual]
 

Creates a new external interface for NCBI/BLAST searching.

void MyFrame::OnFileImport wxCommandEvent &  event  )  [virtual]
 

Handles the "import from file" dialog, then calls MyFrame::importFile.

void MyFrame::OnFileOpen wxCommandEvent &  event  )  [virtual]
 

Invokes the "open from database" dialog.

void MyFrame::OnGraph wxCommandEvent &  event  )  [virtual]
 

Handles the Graph menu event by calling MyFrame::RunGraph.

void MyFrame::OnHelp wxCommandEvent &  event  )  [virtual]
 

Invokes help.

void MyFrame::OnHomepage wxCommandEvent &  event  )  [virtual]
 

Invokes homepage.

void MyFrame::OnImageViewer wxCommandEvent &  event  )  [virtual]
 

Invokes the image viewer module.

void MyFrame::OnLigation wxCommandEvent &  event  )  [virtual]
 

void MyFrame::OnlineTools wxCommandEvent &  event  )  [virtual]
 

Reroutes context menu events to online tools.

void MyFrame::OnManageDatabase wxCommandEvent &  event  )  [virtual]
 

Handles the Manage Database menu event.

void MyFrame::OnMDIClose wxCommandEvent &  event  )  [virtual]
 

Closes MDI child via (Crtl-F4).

void MyFrame::OnProgramOptions wxCommandEvent &  event  )  [virtual]
 

Handles the Program Options menu event, and stores the options in the local database.

!!!!!! fix this!

void MyFrame::OnProjectClose wxCommandEvent &  event  )  [virtual]
 

Handles the Close Project menu event.

void MyFrame::OnProjectLoad wxCommandEvent &  event  )  [virtual]
 

Handles the Load Project menu event.

void MyFrame::OnProjectSave wxCommandEvent &  event  )  [virtual]
 

Handles the Save Project menu event.

void MyFrame::OnQuit wxCommandEvent &  event  )  [virtual]
 

Handles the Quit command, closes.

void MyFrame::OnSashDrag wxSashEvent &  event  )  [virtual]
 

Handles SashDrag events (sash between the main tree and the current child.

void MyFrame::OnSequencingAssistant wxCommandEvent &  event  )  [virtual]
 

void MyFrame::OnSize wxSizeEvent &  event  )  [virtual]
 

Handles OnSize events.

void MyFrame::OnTextImport wxCommandEvent &  event  )  [virtual]
 

Invokes the "enter sequence manually" dialog and calls the appropriate creation function.

void MyFrame::pop_help  )  [virtual]
 

void MyFrame::push_help wxString  name  )  [virtual]
 

void MyFrame::rememberLastProject  )  [virtual]
 

Stores the last open project for reopening on program start.

void MyFrame::removeChild ChildBase ch  )  [virtual]
 

Safely removes a child from the children list.

Parameters:
ch Pointer to child

void MyFrame::RerouteMenu wxCommandEvent &  event  )  [virtual]
 

Reroutes menu events from the frame to the active child.

TAlignment * MyFrame::runAlignment wxArrayString &  vs,
wxArrayChildBase &  vc,
TVector nv = NULL
[virtual]
 

Creates a new alignment window.

TCalculator * MyFrame::RunCalculator  )  [virtual]
 

Invokes the calculator module.

TGraph * MyFrame::RunGraph  )  [virtual]
 

Invokes the graph module.

void MyFrame::saveImage wxBitmap *  bmp,
wxString  name = _T("")
[virtual]
 

Saves an image (actually, a wxBitmap) to a file, with "save as" dialog.

void MyFrame::setActiveChild ChildBase c  )  [virtual]
 

Sets the active child.

Parameters:
c Pointer to the child

void MyFrame::setChild ChildBase ch  )  [virtual]
 

Adds a child, if it is not already in the children list.

Parameters:
ch Pointer to child

void MyFrame::setDummyToolbar ChildBase c  )  [virtual]
 

Generates a basic tooblar.

void MyFrame::TestMenu wxCommandEvent &  event  )  [virtual]
 

Handles the menu request for running the test suite.

wxBitmap MyFrame::to_grey wxBitmap &  bmp1  )  [private]
 

void MyFrame::update2version wxString  ver  )  [virtual]
 

Download the new version of GENtle.

Parameters:
ver New version

void MyFrame::updateCCP ChildBase c  )  [virtual]
 

Updates cut, copy, paste, find icons.

TVirtualGel * MyFrame::useGel wxString  type  )  [virtual]
 

Creates/reuses a virtual gel.


Member Data Documentation

wxColour MyFrame::aa_color
 

bool MyFrame::activating [private]
 

In child activation?

vector<wxBitmap> MyFrame::bitmaps
 

The bitmaps in the user interface.

bool MyFrame::checkUpdate
 

wxArrayChildBase MyFrame::children
 

List of pointers to all child windows.

wxArrayTStorage MyFrame::dbcache [private]
 

Cache of databases for faster access.

wxArrayString MyFrame::dna_marker
 

bool MyFrame::doRegisterStuff
 

bool MyFrame::dying
 

int MyFrame::editFeatureMode
 

bool MyFrame::enhancedRefresh
 

TEnzymeRules* MyFrame::global_enzyme_rules
 

The global rules for which enzymes to use/display.

vector<wxString> MyFrame::help_name [private]
 

wxHtmlEasyPrinting* MyFrame::html_ep
 

HTML printer wrapper for TCalculator.

wxString MyFrame::lang_string
 

The user interface language name.

ChildBase* MyFrame::lastChild [private]
 

Last child shown.

wxArrayString MyFrame::lastCocktail
 

Enzymes of the last restriction cocktail.

bool MyFrame::loadLastProject
 

int MyFrame::locked [private]
 

State of display locking.

TStorage* MyFrame::LS
 

Pointer to the local TStorage database structure.

wxSashLayoutWindow* MyFrame::m_bottomWindow [private]
 

Frame layout, bottom window (unused).

wxSashLayoutWindow* MyFrame::m_leftWindow1 [private]
 

Frame layout, left window.

wxSashLayoutWindow* MyFrame::m_leftWindow2 [private]
 

Frame layout, right window.

wxSashLayoutWindow* MyFrame::m_topWindow [private]
 

Frame layout, top window (unused).

wxToolBar* MyFrame::mainToolBar
 

The main toolbar.

TMainTree* MyFrame::mainTree
 

The main tree (for sequences etc.).

wxMenuBar* MyFrame::menu_bar [private]
 

The current menu bar.

int MyFrame::nonstandard_translation_table
 

TOnlineTools* MyFrame::online_tools
 

TProject MyFrame::project
 

The current project.

bool MyFrame::showEnzymePos
 

bool MyFrame::showSplashScreen
 

int MyFrame::showStopCodon
 

bool MyFrame::showToolTips
 

bool MyFrame::showVectorLength
 

bool MyFrame::showVectorTitle
 

char MyFrame::stopcodon
 

wxToolBar* MyFrame::tb_mychild
 

The shared toolbar (?).

bool MyFrame::useCoolCanvas
 

bool MyFrame::useInternalHelp
 

bool MyFrame::useMetafile
 

bool MyFrame::useOnlineHelp
 

bool MyFrame::useTwoToolbars
 


The documentation for this class was generated from the following files:
Generated on Fri Aug 11 16:19:44 2006 for GENtle by  doxygen 1.4.1