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

Source Code for Module lib.text.gui

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