Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
FontSample.ConfigurationDialog Class Reference

List of all members.

Public Member Functions

def __init__
def ok

Public Attributes

 parent
 result
 topFrame
 paperSizeLabel
 sampleSelectFrame
 btnWantAlphabet
 btnWant6Point
 btnWant8Point
 btnWant10Point
 btnWant12Point
 btnWant16Point
 btnWant20Point
 btnWant32Point
 btnParagraphSelect
 paperSizeFrame
 a4papersizeSelect
 uspapersizeSelect
 btnFrame
 btnOk
 initial_focus

Private Member Functions

def __sampleSelectionClick
def __paperSelectionClick

Private Attributes

 __wantAlphabet
 __want6Point
 __want8Point
 __want10Point
 __want12Point
 __want16Point
 __want20Point
 __want32Point
 __wantParagraph
 __paper

Detailed Description

Definition at line 832 of file FontSample.py.


Constructor & Destructor Documentation

def FontSample.ConfigurationDialog.__init__ (   self,
  parent 
)

Definition at line 834 of file FontSample.py.

00834 
00835     def __init__(self, parent):
00836         Toplevel.__init__(self, parent)
00837         self.transient(parent)
00838         self.title('Configuration')
00839         self.parent = parent
00840         self.result = None
00841         self.resizable(0, 0)
00842 
00843         # Create outer frame...
00844         self.topFrame = Frame(self, bd=1, relief=FLAT)
00845         self.topFrame.grid(row=0, column=0, padx=5, pady=5)
00846 
00847         self.paperSizeLabel = Label(self.topFrame, text='Sample Rows:')
00848         self.paperSizeLabel.grid(row=0, column=0, sticky=W)
00849 
00850         # This frame holds each sample selector...
00851         self.sampleSelectFrame = Frame(self.topFrame, bd=1, relief=RIDGE)
00852         self.sampleSelectFrame.grid(row=1, column=0, padx=0, pady=2)
00853 
00854         # now create the sample selector widgets for the frame...
00855         self.__wantAlphabet = IntVar()
00856         self.btnWantAlphabet = Checkbutton(self.sampleSelectFrame, text='want alphabet row', variable=self.__wantAlphabet, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00857         self.btnWantAlphabet.grid(row=0, column=0, padx=10, pady=0, sticky=W)
00858         if userPrefs['wantAlphabet']:
00859             self.btnWantAlphabet.select()
00860 
00861         self.__want6Point = IntVar()
00862         self.btnWant6Point = Checkbutton(self.sampleSelectFrame, text='want 6 point row', variable=self.__want6Point, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00863         self.btnWant6Point.grid(row=1, column=0, padx=10, pady=0, sticky=W)
00864         if userPrefs['want6Point']:
00865             self.btnWant6Point.select()
00866 
00867         self.__want8Point = IntVar()
00868         self.btnWant8Point = Checkbutton(self.sampleSelectFrame, text='want 8 point row', variable=self.__want8Point, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00869         self.btnWant8Point.grid(row=2, column=0, padx=10, pady=0, sticky=W)
00870         if userPrefs['want8Point']:
00871             self.btnWant8Point.select()
00872 
00873         self.__want10Point = IntVar()
00874         self.btnWant10Point = Checkbutton(self.sampleSelectFrame, text='want 10 point row', variable=self.__want10Point, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00875         self.btnWant10Point.grid(row=3, column=0, padx=10, pady=0, sticky=W)
00876         if userPrefs['want10Point']:
00877             self.btnWant10Point.select()
00878 
00879         self.__want12Point = IntVar()
00880         self.btnWant12Point = Checkbutton(self.sampleSelectFrame, text='want 12 point row', variable=self.__want12Point, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00881         self.btnWant12Point.grid(row=4, column=0, padx=10, pady=0, sticky=W)
00882         if userPrefs['want12Point']:
00883             self.btnWant12Point.select()
00884 
00885         self.__want16Point = IntVar()
00886         self.btnWant16Point = Checkbutton(self.sampleSelectFrame, text='want 16 point row', variable=self.__want16Point, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00887         self.btnWant16Point.grid(row=5, column=0, padx=10, pady=0, sticky=W)
00888         if userPrefs['want16Point']:
00889             self.btnWant16Point.select()
00890 
00891         self.__want20Point = IntVar()
00892         self.btnWant20Point = Checkbutton(self.sampleSelectFrame, text='want 20 point row', variable=self.__want20Point, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00893         self.btnWant20Point.grid(row=6, column=0, padx=10, pady=0, sticky=W)
00894         if userPrefs['want20Point']:
00895             self.btnWant20Point.select()
00896 
00897         self.__want32Point = IntVar()
00898         self.btnWant32Point = Checkbutton(self.sampleSelectFrame, text='want 32 point row', variable=self.__want32Point, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00899         self.btnWant32Point.grid(row=7, column=0, padx=10, pady=0, sticky=W)
00900         if userPrefs['want32Point']:
00901             self.btnWant32Point.select()
00902 
00903         self.__wantParagraph = IntVar()
00904         self.btnParagraphSelect = Checkbutton(self.sampleSelectFrame, text='want sample paragraph', variable=self.__wantParagraph, offvalue=0, onvalue=1, command=self.__sampleSelectionClick)
00905         self.btnParagraphSelect.grid(row=8, column=0, padx=10, pady=0, sticky=W)
00906         if userPrefs['wantParagraph']:
00907             self.btnParagraphSelect.select()
00908 
00909         self.paperSizeLabel = Label(self.topFrame, text='Paper Sizes:')
00910         self.paperSizeLabel.grid(row=2, column=0, sticky=W)
00911 
00912         self.paperSizeFrame = Frame(self.topFrame, bd=1, relief=RIDGE)
00913         self.paperSizeFrame.grid(row=3, column=0, padx=0, pady=2, sticky=W)
00914 
00915         self.__paper = StringVar()
00916         self.a4papersizeSelect = Radiobutton(self.paperSizeFrame, text='A4', variable=self.__paper, value='A4', command=self.__paperSelectionClick)
00917         self.a4papersizeSelect.grid(row=1, column=0, padx=10, sticky=W)
00918         self.uspapersizeSelect = Radiobutton(self.paperSizeFrame, text='US Letter', variable=self.__paper, value='US Letter', command=self.__paperSelectionClick)
00919         self.uspapersizeSelect.grid(row=2, column=0, padx=10, sticky=W)
00920 
00921         # set to match prefs...
00922         if userPrefs['paperSize'] == 'US Letter':
00923             self.uspapersizeSelect.select()
00924         if userPrefs['paperSize'] == 'A4':
00925             self.a4papersizeSelect.select()
00926 
00927         self.btnFrame = Frame(self.topFrame)
00928         self.btnFrame.grid(row=4, column=0, padx=10, pady=2)
00929         self.btnOk = Button(self.btnFrame, text='OK', command=self.ok)
00930         self.btnOk.grid(row=2, column=0, pady=5)
00931         self.bind('<Return>', self.ok)
00932         self.grab_set()
00933         self.initial_focus = self.btnOk
00934         self.wait_window(self)
00935 


Member Function Documentation

Definition at line 953 of file FontSample.py.

00953 
00954     def __paperSelectionClick(self):
00955         userPrefs['paperSize'] = self.__paper.get()
00956         self.parent.statusbarUpdate()

Get and store all the selections.

Just assigns the lot at once. Not worth being picky and only
assigning values that have changed since last time.

Definition at line 936 of file FontSample.py.

00936 
00937     def __sampleSelectionClick(self):
00938         """Get and store all the selections.
00939         
00940         Just assigns the lot at once. Not worth being picky and only
00941         assigning values that have changed since last time.
00942         """
00943         userPrefs['wantAlphabet'] = self.__wantAlphabet.get()
00944         userPrefs['want6Point'] = self.__want6Point.get()
00945         userPrefs['want8Point'] = self.__want8Point.get()
00946         userPrefs['want10Point'] = self.__want10Point.get()
00947         userPrefs['want12Point'] = self.__want12Point.get()
00948         userPrefs['want16Point'] = self.__want16Point.get()
00949         userPrefs['want20Point'] = self.__want20Point.get()
00950         userPrefs['want32Point'] = self.__want32Point.get()
00951         userPrefs['wantParagraph'] = self.__wantParagraph.get()
00952         self.parent.statusbarUpdate()

def FontSample.ConfigurationDialog.ok (   self,
  event = None 
)

Definition at line 957 of file FontSample.py.

00957 
00958     def ok(self, event=None):
00959         dD.update(set_page_geometry(dD, geometriesList, userPrefs['paperSize'], userPrefs['wantBindingOffset']))
00960         self.withdraw()
00961         self.update_idletasks()
00962         self.parent.focus_set()
00963         self.destroy()
00964 

Here is the call graph for this function:


Member Data Documentation

Definition at line 914 of file FontSample.py.

Definition at line 872 of file FontSample.py.

Definition at line 878 of file FontSample.py.

Definition at line 884 of file FontSample.py.

Definition at line 890 of file FontSample.py.

Definition at line 896 of file FontSample.py.

Definition at line 860 of file FontSample.py.

Definition at line 866 of file FontSample.py.

Definition at line 854 of file FontSample.py.

Definition at line 902 of file FontSample.py.

Definition at line 915 of file FontSample.py.

Definition at line 926 of file FontSample.py.

Definition at line 928 of file FontSample.py.

Definition at line 903 of file FontSample.py.

Definition at line 873 of file FontSample.py.

Definition at line 879 of file FontSample.py.

Definition at line 885 of file FontSample.py.

Definition at line 891 of file FontSample.py.

Definition at line 897 of file FontSample.py.

Definition at line 861 of file FontSample.py.

Definition at line 867 of file FontSample.py.

Definition at line 855 of file FontSample.py.

Definition at line 932 of file FontSample.py.

Definition at line 911 of file FontSample.py.

Definition at line 846 of file FontSample.py.

Definition at line 838 of file FontSample.py.

Definition at line 839 of file FontSample.py.

Definition at line 850 of file FontSample.py.

Definition at line 843 of file FontSample.py.

Definition at line 917 of file FontSample.py.


The documentation for this class was generated from the following file: