[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] request for comments and/or committing : GUI references in standard libraries



hello,

i have modified the classes in the standard lib referring to GUI objects in a way to use the GUI class instead of direct calls to cocoa GUI objects. i have tested all methods, but it would be cool if anyone can independantly verify there are no errors. for cocoa GUI, there should be no visible changes whatsoever (apart from the 'resizable = false' i added to Server->makeWindow and the corrected window height in SynthDescPlusGUI.sc). for SwingOSC, some stuff doesn't work with v0.43 because I have decided to add a few helper methods in (J)Stethoscope and (J)Font such as to provide better interoperability between the two GUI kits:

- In (J)Stethoscope, *defaultServer tells you on which server this scope should be used, and *isValidServer checks any server for usability with that scope. For example, isValidServer ( Server.internal ) will return true on cocoa and false on SwingOSC, while for isValidServer( Server.local ) will be just the opposite results.

- In (J)Font, *defaultSansFace, *defaultSerifFace, *defaultMonoFace will return the default font names that should be used for the particular use. The instance method 'boldVariant' returns a new font with same face and size as the current font, but as a bold variant.

I'd be happy to hear if you are happy with making these changes. Please drop me note if when commited, because i would have to put an updated SwingOSC online as well.

ciao, -sciss-



here is a kind of simpler listing of the diffs (i used against SVN built from just today so all classes should be up-to-date):


Common/Core/Object.sc
	added 'gui' argument to method 'inspect'

Common/GUI/Basic/Font.sc
	added instance method 'boldVariant'
added class methods 'defaultSansFace', 'defaultSerifFace', 'defaultMonoFace'

Common/GUI/GUI.sc
	updated new classes for SwingOSC
	making SwingOSC default scheme where cocoa is not available

Common/GUI/Inspector.sc
	added 'gui' instance variable and argument to Inspector constructor
	replaced cocoa GUI class constructors with calls to GUI
	added 'gui' argument to button actions (Message creations)
	added 'gui' instance variable and argument to SlotInspector constructor
	removed superfluous font assignments (Helvetica 12 = cocoa default)
	
Common/GUI/PlusGUI/Control/ServerPlusGUI.sc
	added 'gui' argument to 'makeWindow' method
	replaced cocoa GUI class constructors with calls to GUI
	made window non-resizable (why should it be resizable?)
replaced font creations with calls to 'GUI.font.defaultSansFace' and 'boldVariant' replaced scope check for internal server with call to 'GUI.stethoscope.isValidServer'
	added 'gui' argument to 'scope' call
	
Common/GUI/PlusGUI/Control/SynthDescLibPlusGUI.sc
	added 'gui' argument to 'browse' method
	replaced font creations with calls to 'GUI.font.defaultMonoFace'
	replaced cocoa GUI class constructors with calls to GUI
	added 'gui' argument to 'makeWindow' call
	
Common/GUI/PlusGUI/Control/SynthDescPlusGUI.sc
	added 'gui' argument to 'makeWindow' method
	replaced cocoa GUI class constructors with calls to GUI
	deferred window-to-front call to end of GUI construction
	made correct window height for numControls
put gradient background in if-block so it only gets executed with cocoa gui

Common/GUI/PlusGUI/Control/UGen-scope.sc
	added 'gui' argument to 'scope' method of '+ UGen'
	replaced cocoa GUI class constructors with calls to GUI
	replaced 'Server.internal' with 'GUI.stethoscope.defaultServer'
	added 'gui' argument to 'scope' method of '+ Array'

Common/GUI/PlusGUI/Control/server-scope.sc
	added 'gui' argument to 'scope' method of '+ Server'
	replaced cocoa GUI class constructors with calls to GUI
	added 'gui' argument to 'scope' method of '+ Bus'
	added 'gui' argument to 'scope' method of '+ Function'
	replaced 'Server.internal' with 'GUI.stethoscope.defaultServer'
	added 'gui' argument to 'scope' call

Common/GUI/PlusGUI/Core/ClassBrowser.sc
	added 'gui' argument to constructor
	replaced cocoa GUI class constructors with calls to GUI
replaced font creations with calls to 'GUI.font.defaultSansFace' and 'boldVariant'

Common/GUI/PlusGUI/Core/KernelPlusGUI.sc	
	added 'gui' argument to 'browse' method

Common/GUI/PlusGUI/Files/FilePlusGUI.sc
	added 'gui' argument to 'openDialog' and 'saveDialog' methods
	replaced cocoa GUI class constructors with calls to GUI

Common/GUI/PlusGUI/Math/SignalPlusGUI.sc
	added 'gui' argument to 'plot' methods
	replaced cocoa GUI class constructors with calls to GUI

Common/GUI/Stethoscope.sc
	added class method 'defaultServer'
	added class method 'isValidServer'

JITLib/ProxySpace/BroadcastServer.sc
	added 'gui' argument to 'makeWindow' method

JITLib/ProxySpace/NodeProxy.sc
	added 'gui' argument to 'scope' method


Attachment: updated.zip
Description: Zip archive