Changeset 32:316b0230a849

Show
Ignore:
Timestamp:
04/30/08 13:05:56 (8 months ago)
Author:
Diggory Hardy <diggory.hardy@gmail.com>
branch:
default
convert_revision:
b45af4f2edc84007082f2ef8d29d6c881f9ee9c2
Message:

Lots more work on the GUI. Also renamed lots of files.

Lots of changes to the GUI. Renderer is now used exclusively for rendering and WidgetDecoration? is gone.
Renamed lots of files to conform to case policies.

committer: Diggory Hardy <diggory.hardy@gmail.com>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • codeDoc/jobs.txt

    r31 r32  
    4949 
    5050Done (for git log message): 
    51 Removed some circular dependencies which slipped in. As a result, the OpenGL code got separated into different files. 
    52 Enabled widgets to recieve events. 
    53 New IParentWidget interface allowing widgets to interact with their parents. 
    54 New Widget base class. 
    55 New WidgetDecoration class. 
    56 New ButtonWidget class responding to events (in a basic way). 
     51Lots of changes to the GUI. Renderer is now used exclusively for rendering and WidgetDecoration is gone. 
     52Renamed lots of files to conform to case policies. 
  • codeDoc/policies.txt

    r26 r32  
    5454Long lines: Aim to break long lines at around 100 chars (particularly with documentation); this isn't essential but provides a good guide and keeps text looking reasonable. With code, however, breaking lines doesn't always produce better-looking code so just try to keep it neat. 
    5555 
    56 Identifiers: as for the D spec, use descriptive words for identifiers, although try to keep them from being overlong. Use capital letters to show separate words, not underscores. E.g.: file, readFile; not: rdFile, read_file, readFileUsingMyMethodNow. Use CAPS for consts (with underscores as word separators), Capitalisation for class/interface/struct/union names, smallLetters for variables and class instances. 
     56Identifiers: as for the D spec, use descriptive words for identifiers, although try to keep them from being overlong. Use capital letters to show separate words, not underscores. E.g.: file, readFile; not: rdFile, read_file, readFileUsingMyMethodNow. Use CAPS for consts (with underscores as word separators), Capitalisation for class/interface/struct/union names, smallLetters for variables and class instances. Don't capitalise acronyms like SDL; instead use capitalisation like outlined above (personally I hate doing so but it does make things clearer). 
    5757 
    58 Module/file names: If the module corresponds directly to a single class, use the class name with correct Capitalisation as the module name. Otherwise, preferably use lower case. Always use the correct case when importing a module to keep code portable. 
     58Module/file names: If the module corresponds directly to a class (possibly also with some associated classes), use the class name with correct Capitalisation as the module name. Otherwise, use lower case. Always use the correct case when importing a module to keep code portable. 
    5959 
    6060Spelling (within code): I am not going to stipulate British/American/other spellings, but keep to good English and use some consistancy (e.g. don't use both "defense" and "instance" together, unless unavoidable due to existing code). 
     
    7878Use a separate package for each module of the engine. In most packages where there is only one module (file) imported by other parts of the engine, that module should have the same name as the package and be designed to have a standardised interface to the package so that the package could be replaced with another as a drop-in replacement (written with the same interface). Of course in many cases it may not be possible to swich one package for another quite this easily, but holding to this principle should at least minimise the amount of work necessary when doing so. 
    7979 
    80 Module imports: don't use public imports much, although for importing interfaces it may make sense. Use static/renamed/selective imports when importing a module containing a lot of module-level symbols unless it is a very closely related module. 
    8180 
    82 Chain dependancies: If at all possible, avoid chain dependancies (e.g. use interfaces). Chain dependancies can cause many problems. 
     81Module imports: 
     82Only publically import module A into module B if you can be fairly sure that any module C importing module B will also need module A. 
     83 
     84Try to make it obvious which module the symbols you use come from. Sometimes using static or renamed imports is the best way to do this. Sometimes selective imports also help avoid confusion. 
     85 
     86Where it is not obvious, show what the import is used for with a comment or selective import showing which symbols are used. 
     87 
     88Chain dependancies: Avoid chain dependancies between modules (e.g. use interfaces). Chain dependancies can cause many problems. 
    8389 
    8490 
  • data/conf/gui.mtt

    r31 r32  
    11{MT01} 
     2<char[]|Renderer="Simple"> 
    23{W1} 
    34<int|x=0> 
  • mde/events.d

    r31 r32  
    1818 
    1919import global = mde.global; 
    20 import sdl = mde.SDL;           // resizeWindow 
     20import sdl = mde.sdl;           // resizeWindow 
    2121 
    22 import mde.input.input; 
     22import mde.input.Input; 
    2323 
    2424import derelict.sdl.events; 
  • mde/gl/draw.d

    r31 r32  
    1919module mde.gl.draw; 
    2020 
    21 import mde.gui.gui; 
     21import mde.gui.Gui; 
    2222 
    2323import derelict.sdl.sdl; 
  • mde/global.d

    r30 r32  
    2424module mde.global; 
    2525 
    26 import mde.input.input; 
     26import mde.input.Input; 
    2727import mde.scheduler.Scheduler; 
    2828 
  • mde/scheduler/Init.d

    r31 r32  
    2323module mde.scheduler.Init; 
    2424 
    25 import mde.scheduler.Init2;     // This module is responsible for setting up some init functions. 
    26 import mde.scheduler.InitFunctions; 
     25import mde.scheduler.init2;     // This module is responsible for setting up some init functions. 
     26import mde.scheduler.initFunctions; 
    2727import mde.scheduler.exception; 
    2828 
    29 import mde.options; 
     29import mde.Options; 
    3030import paths = mde.resource.paths; 
    3131import mde.exception;