GtkSheet-6.0 ============ GtkSheet has move to gtk+-1.2 and new features have been added. The new distribution includes a set of new widgets. GtkSheetEntry has been updated. Now, it is a GtkEntry subclass. The main diferences with GtkEntry are: - It doesn't draw the border. - It is dinamically resized when the text is typed. - It allows right/left/center text justification. (gtk_entry_size_allocate & entry_adjust_scroll) GtkSheet can be created with a custom entry widget. You can use GtkEntry or a GtkEntry subclass (e.g. GtkSheetEntry, GtkSpinButton) or a box or table containing a GtkEntry subclass (e.g. GtkCombo) gtk_sheet_new_with_custom_entry (gint nrows, gint ncols, GtkType *entry_type); Example: sheet = gtk_sheet_new_with_custom_entry(10, 10, gtk_combo_get_type()); The entry can be changed on the fly with: gtk_sheet_change_entry(GtkSheet *sheet, GtkType *entry_type); New signals policy: - "activate_cell" is emited when the entry enters to a new cell. - "deactivate_cell" is emited when the entry is deactivated before moving to another cell or starting a selection. - "traverse" is emited before "deactivate_cell" and allows to reject the movement. In such case, the signal handler must return FALSE, the entry will remain in the site, and the other signals will not be emited. GtkSheet-6.0 has been tested with gtk+-1.1.12 without problems. Contributions: ============= * Mario Motta He ported GtkSheet to VDK * Martin Schultze Set up a mirror at ftp://ftp.infodrom.north.de/pub/unix/gtk-etc/libs/gtksheet/ * Andrew Veliath He did the first version for gtk+-1.2, he had the idea of a GtkSheetEntry as a GtkEntry subclass and made the first draft for the new GtkSheetEntry. Here I add his comments: - GtkSHEntry substantially rewritten for Gtk 1.2, and is now smaller since it is a direct subclass of GtkEntry. Note all these Gtk 1.2 changes pretty make it incompatible with Gtk 1.0, so it is sort of for the next "run" which is somewhat soon now anyway. I'm not sure if all the features are duplicated, you should probably check. - gtk_entry_new* changed to accept an option GtkType. If the GtkType is zero, then use the default GtkSHEntry. If it is non-zero, then use the specified type as the entry type (it is check to be a subclass of GtkSHEntry, and if not the default is used anyway with a warning). I figure that since Gtk 1.2 is required anyway, what's the harm of adding a new argument to _new ;-). I've tested this partially with a custom GtkSHEntry subclass of mine which overrides some keypresses, and it seems to work. - Some NULL checks here and there. Particularly if a font is not found, the attribute.font doesn't get set. * Steven rostedt He patched some bugs * Rob Browning He proposed the new event signals policy: activate() called upon actual entry to a cell and providing access to the new row and col values (and perhaps the old row and col). deactivate() called upon *actual* exit from a cell, and providing access to the current row and col values (and perhaps the pending ones). traverse() called when a change to a new cell is proposed (i.e. the user clicks, tabs, whatever. The callback would also be able to set "veto" to tell gtksheet that it wants the proposed traversal to be ignored entirely. GtkSheet Xtra Widgets Set ========================= GtkComboBox: ============ Derived from Paolo Molaro's GtkCombo, it consists of a button, an arrow button, and a popup window with a frame, that can contain a widget which is displayed with the arrow. You can pack any widget in the frame (e.g. GtkCalendar). It has been thought to be a parent class for the following widgets: GtkColorCombo: ============== It's a GtkComboBox subclass with a pallette of colors diplayed in a table. GtkBorderCombo: ============== It's a GtkComboBox subclass with a set of border patterns displayed in a table. NOTE: - Why not using GtkLayout? With GtkSheet you can create a table of an indefinite number of cells. In principle, this is true, and the amount of memory you are using depends on the number of cells that are not empty. GtkSheet uses a backing pixmap that fits in the screen, and it's resized each time the window is resized. When you scroll the window, the whole pixmap is redrawn. If you use GtkLayout you should keep in memory a huge pixmap that consumes a large amount of memory (imagine a sheet of 10000x100 cells). ------------------------------------------------------------------------------ GtkSheet-5.7 ============ Function added by Steven Rostedt: gint gtk_sheet_get_state (GtkSheet *sheet) Resizing rows and columns improved. Bug fixes, including two bugs causing crash when the widget is destroyed (style bug patched in part by Steve) ANNOUNCE: GtkSheet is moving to Gtk+-1.2 GtkSheet-5.6 ============ GtkSheet now allows font handling with gtk_sheet_range_set_font (GtkSheet *sheet, GtkSheetRange range, GdkFont *font) Problems with Solaris have been fixed. Steven Rostedt fixed a bug when adding rows/columns. Some little changes in the demo to show the new features and to avoid the redraw in the example 1. Other bugs fixed. GtkSheet-5.5 ============ Many bugs fixed, mainly reported by Mario Motta. All warnings fixed. Signals: "changed" is emited when typing into the active cell, changing its contents. "set_cell" is emited when pressing when changing current cell's position. "activate_cell" is emited when the new cell is activated. NOTE: gtksheet crashes on Solaris. I couldn't fix this, yet. GtkSheet-5.4 ============ Following Mario Motta's suggestions I added a new feature: You can hide/show row and/or column titles (see Example 2 in the demo program) and I patched gtksheet.h for C++ compatibility. I fixed a couple of bugs: multiple emission of the "activate_cell" signal; problems when selecting a row/column and moving with the cursor keys. NOTE: All versions of GtkSheet compile fine with gtk+-1.0.6 Any of the "bugs" reported in the gtk-list has been verified. Please, if you have problems I suggest you to verify if you have gtk+-1.1 intead of gtk+-1.0 installed. If you can't compile, edit the Makefile file. I aknowledge to all of you on the list who are using gtksheet and reporting problems and bugs. Please, give me your suggestions. GtkSheet-5.3 ============ The graphic interface is nicer and more friendly. The appeareance is more familiar and I added some new features: You can make a selection and move it dragging the border. You can resize the selection dragging the bottom-right corner. You can store the selection on the clipboard. (All this functions emit a signal. You can cutomize your application connecting a signal handler in order to do the desired action. See the example 1 in the demo program) NOTE: the selection handler has not been implemented yet. The demo program is an application which includes an external entry connected with the sheet's entry. The external entry does not belong to the widget, the widget has its own entry and the text is edited interactivelly and "on the site". You can download it from my ftp site: ftp://ripley.ifir.edu.ar/pub/gtk/gtksheet/gtksheet-5.3.tar.gz I'm uploading the new version to gtk.org I hope it will be included in future releases of gtk. -------------------------------------------------------------------------- GtkSheet is a Matrix/Table widget for Gtk+ Originally, it was a variant of GtkClist widget (by Jay Painter) but it became more than I expected, and actually it has almost nothing to do with it. This distribution includes a demo program where you can see many of the widget's features. You can download it from my ftp site: ftp://ripley.ifir.edu.ar/pub/gtk/gtksheet/gtksheet-5.3.tar.gz BRIEF DESCRIPTION ================= GtkSheet is a matrix where you can allocate cells of text. Cell contents can be edited interactively with an specially designed entry, based on GtkEntry (so it has the same features). You can parse text connecting a parser to the "set cell" signal. (See example 2 in the demo program) You can change width, height, background color, foreground color, border color, border style, and many other attributes of the cells. (see examples in the demo program) You can use the matrix as a browser with gtk_sheet_new_browser, and the cell contents could not be edited. ** READ THE HEADERS FOR MORE INFORMATION ** TO DEVELOPERS ============== GtkSheet is a composite widget: scrollbars, entry, and a button. I realized that I can gain a lot of time and memory replacing button widgets with button emulating gadgets. This is one of the main differences with GtkClist GUI, and I don't use windows to resize rows/columns. To allocate memory, I used an array of pointers. I could used a linked list or a hash table, but I was originally inspired in SC (I wanted to do a Gtk port for it), so memory allocation routines are inspired on SC's. I didn't take advantage of the use of glibs, maybe many features could be optimized in this way. GtkSheetEntry is based on the gtk+-0.99.3 realease of GtkEntry, so many bugs must be fixed, and features must be updated. I have no experience on XFonts, so I left this part of the attributes setting to be done by anyone who wants to.