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  if win: 
 43      r1 = "R1" 
 44      r2 = "R2" 
 45   
 46  # Model-free GUI text elements. 
 47  s2 = u("S\u00B2") 
 48  s2f = u("S\u00B2f") 
 49  s2s = u("S\u00B2s") 
 50  local_tm = u("local \u03C4\u2098") 
 51  tm = u("\u03C4\u2098") 
 52  te = u("\u03C4e") 
 53  tf = u("\u03C4f") 
 54  ts = u("\u03C4s") 
 55  rex = u("R\u2091\u2093") 
 56  csa = "CSA" 
 57  r = "r" 
 58  if win: 
 59      local_tm = u("local \u03C4m") 
 60      tm = u("\u03C4m") 
 61      rex = "Rex" 
 62  if mac: 
 63      local_tm = u("local \u03C4m") 
 64      tm = u("\u03C4m") 
 65   
 66  # Relaxation dispersion GUI text elements. 
 67  dw = u("d\u03C9") 
 68  dw_AB = u("d\u03C9(AB)") 
 69  dw_AC = u("d\u03C9(AC)") 
 70  dw_BC = u("d\u03C9(BC)") 
 71  dwH = u("d\u03C9H") 
 72  dwH_AB = u("d\u03C9H(AB)") 
 73  dwH_AC = u("d\u03C9H(AC)") 
 74  dwH_BC = u("d\u03C9H(BC)") 
 75  i0 = u("I\u2080") 
 76  kex = u("k\u2091\u2093") 
 77  tex = u("t\u2091\u2093") 
 78  kAB = u("k\u2091\u2093(AB)") 
 79  kAC = u("k\u2091\u2093(AC)") 
 80  kBC = u("k\u2091\u2093(BC)") 
 81  padw2 = u("pA.d\u03C9\u00B2") 
 82  phi_ex = u("\u03D5\u2091\u2093") 
 83  phi_exB = u("\u03D5\u2091\u2093B") 
 84  phi_exC = u("\u03D5\u2091\u2093C") 
 85  r1rho = u("R\u2081\u1D68") 
 86  r1rho_prime = u("R\u2081\u1D68'") 
 87  r2a = u("R\u2082A") 
 88  r2b = u("R\u2082B") 
 89  r2eff = u("R\u2082eff") 
 90  if win: 
 91      i0 = "I0" 
 92      kex = "kex" 
 93      kAB = "kex(AB)" 
 94      kAC = "kex(AC)" 
 95      kBC = "kex(BC)" 
 96      phi_ex = u("phi_ex") 
 97      phi_exB = u("phi_exB") 
 98      phi_exC = u("phi_exC") 
 99      r1rho = "R1rho" 
100      r1rho_prime = "R1rho'" 
101      r2a = "R2A" 
102      r2b = "R2B" 
103      r2eff = "R2eff" 
104