|
From: Alexander S.K. <al...@be...> - 2012-12-14 09:05:55
|
Basso, Luis Fernando writes: > Hi > I think the current version of Windows HWGUI is very productive and > optimized and most of the new code was added simply to add new features and > fix events. In my opinion, and, I'm not alone, HwGUI becomes huge, bad structured and bad readable. I am far from being able to accuse anyone, there is my fault, too. I just want to do some work on restructuring the library code to make it compact, light weight and clear, if I could. The main directions as I see it, are the following: 1) clean basic controls, moving extra features to inherited controls ( HStatic => HStaticEx ); 2) get rid off redundant variables and methods without loss of appropriate functionality; 3) fixing some violations of a logic of classes construction ( as the occasion, when HCustomWIndow code calls vars from child classes ); 4) moving some rarely used stuff, which have no relation to the purposes of a library to contrib directory ( for example, the richtext.prg, saymoney.prg ). Maybe, I missed something - I'll be glad to here any advices. This isn't a two days work, but step by step we can do it. > "To be more concrete, I Consider The Following methods of > HCustomWindow the redundant: ResetScrollbars (), SetupScrollbars (), > RedefineScrollbars () - They Do not needed because for most controls, " > These methods are for scrolling windows of objects in containers as class > HPanel. Taking the class hcwindow would have to be repeated in other classes > that were using it, or convert them to functions. Maybe, to have them as functions, is better than to have them in all controls, such as static or edit, where they are redundant. It is possible to declare those functions as EXTERN methods in a classes where they are needed. Or we may create a class as HContainer and make such classes as HPanel inherited from both HControl and HContainer. Regards, Alexander. |