Re: Glade C code a bad thing?



Hi,

I make a converter to make (theoretically) any code from a .glade xml code. The converter read a XML file to "know" what do with each entry on .glade xml file.
 I didn't document it, but I can make this if somebody will have interest.
 The basic work is make six files (in my case is C++ and GTKmm):
1. The general header file (.h) within one class (the window, just one), visual object declarations and the necessary includes plus one include before the class declaration (.hh) e an other before closing the class (.members);
   2. The code (.cc) within the visual objects' configuration;
   3. The extra include .hh empty;
   4. The extra include .members empty;
5. The user code (.cpp) file, within necessary includes and functions parseds. The functions don't are deleted when its owner (visual object) is and new funcions are created and don't supporte rename functions (not yet).
   6. A simple make file.

This converter compares an XML entry (node) from .glade with each one in .ctgtkmm (convert to GTKmm - C++). These comparisons are very complex and I made to solve my necessities, when I can, for exemple, identify a "Entry" with name started with "Custom__EntryName" and result on a declaration "MyEntry EntryName;" instead "Entry Custom__EntryName;" and include `#include "../Custom/MyEntry.h"´ instead `#include <gtkmm/entry.h>´, so I can personalize the generated code to any language (theoretically).

 Somebody does have interest?

--

[]'s

Claudio Polegato Junior

Um peregrino de Problemas; Um pergaminho de Soluções.





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