Changeset 30614

Show
Ignore:
Timestamp:
02/28/09 14:52:42 (4 years ago)
Author:
saturday06
Message:

working...

Location:
lang/cplusplus/i3/trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/i3/trunk/am/i3.am

    r30470 r30614  
    1313                      -funit-at-a-time \ 
    1414                      ${WARNING_OPTIONS} \ 
    15                       -DLOCALEDIR=\"${localedir}\" 
    16  
     15                      -DLOCALEDIR=\"${localedir}\"  
     16                      #-fno-rtti 
    1717#DEFS += -DLOCALEDIR=\"${localedir}\" 
    1818 
  • lang/cplusplus/i3/trunk/src/CompletionWindow.cpp

    r30427 r30614  
    2020} 
    2121 
    22 void CompletionWindow::run() 
    23 { 
    2422} 
    25 } 
  • lang/cplusplus/i3/trunk/src/CompletionWindow.h

    r30427 r30614  
    1818    ~CompletionWindow(); 
    1919 
    20     void run(); 
    21  
    2220    template <typename T> 
    2321    void execute(T& event); 
  • lang/cplusplus/i3/trunk/src/gui-gnustep/CompletionWindowPlatform.cpp

    r30600 r30614  
    44#include "Mediator.h" 
    55 
    6 /** 
    7  * 
    8  */ 
     6typedef i3::CompletionWindowPlatform<i3::CompletionWindow> ParentType; 
     7#define WindowType CompletionWindowObjC 
     8#include <mol/gui-gnustep/GuiModuleObjC.h> 
    99 
    1010using namespace mol; 
     
    2626void CompletionWindowPlatform<CompletionWindow>::createUI() 
    2727{ 
    28  
    2928    NSRect rect = NSMakeRect (100, 100, 200, 200); 
    3029    unsigned int styleMask = NSTitledWindowMask  
    3130        | NSMiniaturizableWindowMask; 
    3231 
    33  
    34     window = [NSWindow alloc]; 
     32    window = [[WindowType alloc] setParent: this]; 
    3533    window = [window initWithContentRect: rect 
    3634                         styleMask: styleMask 
     
    3836                         defer: NO]; 
    3937    [window setTitle:  
    40      [[NSString alloc] initWithUTF8String:_("Hello Completion")]]; 
     38     [[NSString alloc] initWithUTF8String:_("Hello compl")]]; 
    4139    [window makeKeyAndOrderFront: nil]; 
    42  
    4340} 
    4441 
     
    5148 
    5249} 
     50 
     51#include <mol/gui-gnustep/GuiModuleObjCImpl.h> 
  • lang/cplusplus/i3/trunk/src/gui-gnustep/InputWindowPlatform.cpp

    r30600 r30614  
    33#include "InputWindowPlatform.h" 
    44#include "InputWindow.h" 
     5 
     6typedef i3::InputWindowPlatform<i3::InputWindow> ParentType; 
     7#define WindowType InputWindowObjC 
     8#include <mol/gui-gnustep/GuiModuleObjC.h> 
     9 
     10namespace i3 
     11{ 
     12using namespace mol; 
     13 
     14template <> 
     15InputWindowPlatform<InputWindow>::InputWindowPlatform(Mediator& mediator) : mediator(mediator) 
     16{ 
     17} 
     18 
     19template <> 
     20InputWindowPlatform<InputWindow>::~InputWindowPlatform() 
     21{ 
     22} 
     23 
     24template <> 
     25void InputWindowPlatform<InputWindow>::createUI() 
     26{ 
     27/* 
     28    NSRect rect = NSMakeRect (100, 100, 200, 200); 
     29    unsigned int styleMask = NSTitledWindowMask  
     30        | NSMiniaturizableWindowMask; 
     31 
     32    window = [[WindowType alloc] setParent: this]; 
     33    window = [window initWithContentRect: rect 
     34                         styleMask: styleMask 
     35                         backing: NSBackingStoreBuffered 
     36                         defer: NO]; 
     37    [window setTitle:  
     38     [[NSString alloc] initWithUTF8String:_("Hello Input")]]; 
     39    [window makeKeyAndOrderFront: nil]; 
     40*/ 
     41} 
     42 
     43template <> 
     44void InputWindowPlatform<InputWindow>::objctest() 
     45{ 
     46    MessageBox(NULL, _T("foo"), _T("bar"), MB_OK); 
     47} 
     48 
     49template <> 
     50void InputWindowPlatform<InputWindow>::destroy() 
     51{ 
     52} 
     53 
     54template <> 
     55void InputWindowPlatform<InputWindow>::run() 
     56{ 
     57    createUI(); 
     58    loop(); 
     59} 
     60} 
     61 
     62#include <mol/gui-gnustep/GuiModuleObjCImpl.h> 
     63 
    564/* 
    665@interface MyDelegate : NSObject 
     
    47106@end 
    48107*/ 
    49 namespace i3 
    50 { 
    51 using namespace mol; 
    52108 
    53  
    54 template <> 
    55 InputWindowPlatform<InputWindow>::InputWindowPlatform(Mediator& mediator) : mediator(mediator) 
    56 { 
    57 } 
    58  
    59 template <> 
    60 InputWindowPlatform<InputWindow>::~InputWindowPlatform() 
    61 { 
    62 } 
    63  
    64 template <> 
    65 void InputWindowPlatform<InputWindow>::createUI() 
    66 { 
    67     NSRect rect = NSMakeRect (100, 100, 200, 200); 
    68     unsigned int styleMask = NSTitledWindowMask  
    69         | NSMiniaturizableWindowMask; 
    70  
    71  
    72     window = [NSWindow alloc]; 
    73     window = [window initWithContentRect: rect 
    74                          styleMask: styleMask 
    75                          backing: NSBackingStoreBuffered 
    76                          defer: NO]; 
    77     [window setTitle:  
    78      [[NSString alloc] initWithUTF8String:_("Hello Input")]]; 
    79     [window makeKeyAndOrderFront: nil]; 
    80 } 
    81  
    82 template <> 
    83 void InputWindowPlatform<InputWindow>::destroy() 
    84 { 
    85 } 
    86  
    87 template <> 
    88 void InputWindowPlatform<InputWindow>::run() 
    89 { 
    90     createUI(); 
    91     loop(); 
    92 } 
    93 } 
  • lang/cplusplus/i3/trunk/src/gui-gnustep/InputWindowPlatform.h

    r30428 r30614  
    1919    void createUI(); 
    2020    void destroy(); 
     21    void objctest(); 
    2122    Mediator& mediator; 
    2223 
  • lang/cplusplus/i3/trunk/src/mol/include/mol/gui-gnustep/GuiModule.h

    r30600 r30614  
    147147    { 
    148148        [NSApp run]; 
     149        return; 
     150/* 
    149151        while (!breakLoopRequest.load()) 
    150152        { 
     
    162164        } 
    163165        breakLoopRequest.store(false); 
     166*/ 
    164167    } 
    165168};