Package lib :: Package text :: Module gui
[hide private]
[frames] | no frames]

Source Code for Module lib.text.gui

  1  ############################################################################### 
  2  #                                                                             # 
  3  # Copyright (C) 2013 Edward d'Auvergne                                        # 
  4  #                                                                             # 
  5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
  6  #                                                                             # 
  7  # This program is free software: you can redistribute it and/or modify        # 
  8  # it under the terms of the GNU General Public License as published by        # 
  9  # the Free Software Foundation, either version 3 of the License, or           # 
 10  # (at your option) any later version.                                         # 
 11  #                                                                             # 
 12  # This program is distributed in the hope that it will be useful,             # 
 13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
 14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
 15  # GNU General Public License for more details.                                # 
 16  #                                                                             # 
 17  # You should have received a copy of the GNU General Public License           # 
 18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
 19  #                                                                             # 
 20  ############################################################################### 
 21   
 22  # Module docstring. 
 23  """Module defining a number of text elements for use in the GUI. 
 24   
 25  Some of these text elements are operating system dependent due to the incompleteness of the unicode fonts on certain systems. 
 26  """ 
 27   
 28  # relax module imports. 
 29  from lib.compat import SYSTEM, u 
 30   
 31  # OS Flags. 
 32  win = False 
 33  mac = False 
 34  if SYSTEM == 'Windows': 
 35      win = True 
 36  if SYSTEM == 'Darwin': 
 37      mac = True 
 38   
 39  # Relaxation data GUI text elements. 
 40  r1 = u("R\u2081") 
 41  r2 = u("R\u2082") 
 42  rx = u("R\u2093") 
 43  iinf = u("I\u221E") 
 44  if win: 
 45      r1 = "R1" 
 46      r2 = "R2" 
 47      rx = "Rx" 
 48      iinf = "Iinf" 
 49   
 50  # Model-free GUI text elements. 
 51  s2 = u("S\u00B2") 
 52  s2f = u("S\u00B2f") 
 53  s2s = u("S\u00B2s") 
 54  local_tm = u("local \u03C4\u2098") 
 55  tm = u("\u03C4\u2098") 
 56  te = u("\u03C4e") 
 57  tf = u("\u03C4f") 
 58  ts = u("\u03C4s") 
 59  rex = u("R\u2091\u2093") 
 60  csa = "CSA" 
 61  r = "r" 
 62  if win: 
 63      local_tm = u("local \u03C4m") 
 64      tm = u("\u03C4m") 
 65      rex = "Rex" 
 66  if mac: 
 67      local_tm = u("local \u03C4m") 
 68      tm = u("\u03C4m") 
 69   
 70  # Relaxation dispersion GUI text elements. 
 71  dw = u("d\u03C9") 
 72  dw_AB = u("d\u03C9(AB)") 
 73  dw_AC = u("d\u03C9(AC)") 
 74  dw_BC = u("d\u03C9(BC)") 
 75  dwH = u("d\u03C9H") 
 76  dwH_AB = u("d\u03C9H(AB)") 
 77  dwH_AC = u("d\u03C9H(AC)") 
 78  dwH_BC = u("d\u03C9H(BC)") 
 79  i0 = u("I\u2080") 
 80  nu_1 = u("\u03bd\u2081") 
 81  nu_cpmg = u("\u03bd") 
 82  kex = u("k\u2091\u2093") 
 83  tex = u("t\u2091\u2093") 
 84  kAB = u("k\u2091\u2093(AB)") 
 85  kAC = u("k\u2091\u2093(AC)") 
 86  kBC = u("k\u2091\u2093(BC)") 
 87  padw2 = u("pA.d\u03C9\u00B2") 
 88  phi_ex = u("\u03D5\u2091\u2093") 
 89  phi_exB = u("\u03D5\u2091\u2093B") 
 90  phi_exC = u("\u03D5\u2091\u2093C") 
 91  r1rho = u("R\u2081\u1D68") 
 92  r1rho_prime = u("R\u2081\u1D68'") 
 93  r2a = u("R\u2082A") 
 94  r2b = u("R\u2082B") 
 95  r2eff = u("R\u2082eff") 
 96  theta = u("\u03d1") 
 97  w_eff = u("\u03C9_eff") 
 98  w_rf = u("\u03C9_rf") 
 99  if win: 
100      i0 = "I0" 
101      kex = "kex" 
102      kAB = "kex(AB)" 
103      kAC = "kex(AC)" 
104      kBC = "kex(BC)" 
105      nu_1 = u("\u03bd1") 
106      phi_ex = u("phi_ex") 
107      phi_exB = u("phi_exB") 
108      phi_exC = u("phi_exC") 
109      r1rho = "R1rho" 
110      r1rho_prime = "R1rho'" 
111      r2a = "R2A" 
112      r2b = "R2B" 
113      r2eff = "R2eff" 
114      theta = u("theta") 
115