[java-gnome-hackers] My work so far
Brought to you by:
afcowie
From: Mark H. <mh...@ti...> - 2002-08-16 09:38:52
|
Hello everyone!=20 Sorry for not responding sooner - I had to go away for the day yesterday. =20 So far, I have been working on the following gtk classes:=20 Box=20 VBox=20 HBox=20 Table=20 Button=20 ButtonBox=20 VButtonBox=20 HButtonBox=20 Label (just started) Added a build-doc target to the build.xml file=20 I guess I should also work on all subclasses of the above:=20 Combo, Statusbar, ColorSelection, FontSelection, GammaCurve OptionMenu, ToggleButton, CheckButton, RadioButton I will also work on example apps using these widgets. Is there any plan of what example apps should be produced? Do we just follow the previous versions, or write whatever would be useful. IMHO, it would be a good idea to create a java clone of the c gtk-demo program. I believe this demonstrates all of the gtk widgets with a useful interface which also displays a description and source for each. If this is done, the many smaller example apps may not be required (of course, there would have to be some for gnome, etc.) Issues=20 ------ ** Button Constructors: There are four possible constructors for button: - no arguments - a label - a label containing Mnemonic characters (keyboard accelerators) - a stock item ID (string) I have been having trouble deciding how to best implement this. Currently, my best idea has been to have Button() Button(String caption) Button(String caption, boolean hasMnemonic) Stockbutton(String stockID) This would require creating a StockButton Class, which is the same as the Button class except that it uses a different constructor.=20 The other methods in button allow the 'type' of button to be changed, e.g. make a stock button into a normal button. Are there any other ideas for this? or should I implement the above suggestion ** Naming convention I have been trying to make the names more consistent (e.g. using column all the time instead of a mixture of column and col) The Gtk Button has two very strangly named methods - get/set UseUnderline. From the gtk reference, it seems that these should really be called get/set useMnemonic. I will change these unless there are any objections.=20 ** get_type=20 These native methods seem to be present in most classes. What are their purpose? ** Enum=20 for many of the enums, e.g.ReliefStyle, the methods and, or, xor, etc. don't seem to have any use. Also, the test method would, IMHO, be better named equals. ** Box=20 I am confused about how the query child packing should work native static final protected void gtk_box_query_child_packing (int box, int child, boolean[]=20 expand, boolean[] fill, int [] padding, int [] packType); native static final protected void gtk_box_set_child_packing (int box, int child, boolean=20 expand, boolean fill, int padding, int packType); Could someone with more experience of gtk please tell me why the parameters are all arrays? (what do they return?) **Documentation=20 How much javadoc documentation should we provide? As an example, in the Label widget, I copied most of the gtk documentation to the source file. This may seem a little excessive; however if the user is expected to look only at the java-gnome api docs, they may want such a level of detail.=20 --=20 +----------------------------------------------+ | Mark Howard cam.ac.uk mh344@ | | http://www.tildemh.com tildemh.com mh@ | +----------------------------------------------+ --=20 +----------------------------------------------+ | Mark Howard cam.ac.uk mh344@ | | http://www.tildemh.com tildemh.com mh@ | +----------------------------------------------+ |