Changeset 35968

Show
Ignore:
Timestamp:
11/23/09 01:49:35 (4 years ago)
Author:
saturday06
Message:

monkey

Location:
lang/objective-cplusplus/i3/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/configure.ac

    r35953 r35968  
    9090        GCH_LANG="objective-c++-header" 
    9191        CXXFLAGS="$CXXFLAGS -xobjective-c++" 
     92        #CXXFLAGS="$CXXFLAGS $OBJCFLAGS -xobjective-c++" 
    9293        LDFLAGS="$LDFLAGS -xnone -framework Cocoa" 
    9394    ;; 
     
    9697        GCH_LANG="objective-c++-header" 
    9798        CXXFLAGS="$CXXFLAGS -xobjective-c++" 
     99        #CXXFLAGS="$CXXFLAGS $OBJCFLAGS -xobjective-c++" 
    98100        LDFLAGS="$LDFLAGS -xnone" 
    99101 
  • lang/objective-cplusplus/i3/trunk/src/gui-windows/CompletionWindowPlatform.cpp

    r34909 r35968  
    2222template <> 
    2323void CompletionWindowPlatform<CompletionWindow>::createUI() { 
     24    if (hLocalWnd) { 
     25        return; 
     26    } 
     27    // ------------------------------------------------------------- 
     28    // ウィンドウ作成 
     29    // 
     30 
     31    const int DEFAULT_WINDOW_WIDTH = 200; 
     32    const int DEFAULT_WINDOW_HEIGHT = 200; 
     33 
     34    TCHAR ClassName[] = _T("i3/WNDCLASS::lpszClassName/CompletionWindow"); //  <- rule required 
     35    int nCmdShow = SW_SHOW; 
     36 
     37    WNDCLASS wc    = {}; 
     38    wc.style         = CS_HREDRAW | CS_VREDRAW; 
     39    wc.lpfnWndProc   = DefWindowProc; 
     40    wc.cbClsExtra    = 0; 
     41    wc.cbWndExtra    = 0; 
     42    wc.hInstance     = i3::hInstance; 
     43    wc.hIcon         = NULL;//LoadIcon(hCrtInst, MAKEINTRESOURCE(IDI_ICON1)); 
     44    wc.hCursor       = LoadCursor(NULL, IDC_ARROW); 
     45    wc.hbrBackground = GetSysColorBrush(COLOR_3DFACE); 
     46    wc.lpszMenuName  = NULL; 
     47    wc.lpszClassName = ClassName; 
     48 
     49    if (!RegisterClass(&wc)) { 
     50        halt << "lpszClassName: [" << wc.lpszClassName << "]"; 
     51        return; 
     52    } 
     53 
     54    DWORD dwDefaultStyle = WS_POPUP; 
     55    DWORD dwDefaultExStyle = 0; 
     56//    DWORD dwDefaultExStyle = WS_EX_DLGMODALFRAME; 
     57#ifdef _WIN32_WCE 
     58    dwDefaultStyle |= WS_BORDER; 
     59#else 
     60    dwDefaultStyle |= WS_THICKFRAME; 
     61//    dwDefaultStyle |= WS_DLGFRAME; 
     62//    dwDefaultStyle |= WS_BORDER; 
     63#endif 
     64    dwDefaultStyle &= ~WS_CAPTION; 
     65 
     66    HWND hWnd = CreateWindowEx( 
     67                    dwDefaultExStyle, 
     68                    ClassName, 
     69                    _T("i3/CompletionWindow"), //  <- need rule 
     70                    dwDefaultStyle, 
     71                    30, //CW_USEDEFAULT, 
     72                    30, //CW_USEDEFAULT, 
     73                    DEFAULT_WINDOW_WIDTH, 
     74                    DEFAULT_WINDOW_HEIGHT, 
     75                    NULL, 
     76                    NULL, 
     77                    i3::hInstance, 
     78                    NULL 
     79                ); 
     80 
     81    if (!IsWindow(hWnd)) { 
     82        // what ..? 
     83        halt << hWnd; 
     84        return; 
     85    } 
     86 
     87    setWindow(hWnd); 
    2488} 
    2589 
     
    2791void CompletionWindowPlatform<CompletionWindow>::run() { 
    2892    createUI(); 
     93    UpdateWindow(hLocalWnd); 
     94    ShowWindow(hLocalWnd, SW_SHOW); 
    2995    loop(); 
    3096} 
  • lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.cpp

    r35904 r35968  
    421421template <> 
    422422size_t InputWindowPlatform<InputWindow>::getEditVerticalMargin() { 
    423     NONCLIENTMETRICS NCMetrics = {}; 
    424     NCMetrics.cbSize = sizeof(NCMetrics); 
    425     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NCMetrics, 0); 
    426  
    427     DWORD dwStyle = (DWORD)GetWindowLongPtr(hEdit, GWL_STYLE); 
    428     DWORD dwExStyle = (DWORD)GetWindowLongPtr(hEdit, GWL_EXSTYLE); 
    429  
    430     int cyborder = GetSystemMetrics(SM_CYBORDER); 
    431     int cysizeframe = GetSystemMetrics(SM_CYSIZEFRAME); 
    432     int cyfixedframe = GetSystemMetrics(SM_CYFIXEDFRAME); 
    433     int cyedge = GetSystemMetrics(SM_CYEDGE); 
     423    //NONCLIENTMETRICS NCMetrics = {}; 
     424    //NCMetrics.cbSize = sizeof(NCMetrics); 
     425    //SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NCMetrics, 0); 
     426 
     427    //DWORD dwStyle = (DWORD)GetWindowLongPtr(hEdit, GWL_STYLE); 
     428    //DWORD dwExStyle = (DWORD)GetWindowLongPtr(hEdit, GWL_EXSTYLE); 
     429 
     430    //int cyborder = GetSystemMetrics(SM_CYBORDER); 
     431    //int cysizeframe = GetSystemMetrics(SM_CYSIZEFRAME); 
     432    //int cyfixedframe = GetSystemMetrics(SM_CYFIXEDFRAME); 
     433    //int cyedge = GetSystemMetrics(SM_CYEDGE); 
    434434 
    435435//     debug << boost::basic_format<char>( 
     
    465465 
    466466template <> 
    467 void InputWindowPlatform<InputWindow>::loop() { 
     467void InputWindowPlatform<InputWindow>::run() { 
     468    createGui(); 
    468469    UpdateWindow(hLocalWnd); 
    469     int nCmdShow = SW_SHOW; // XXX 
    470     ShowWindow(hLocalWnd, nCmdShow); 
    471     mil::GuiModule<InputWindowPlatform<InputWindow> >::loop(); 
     470    ShowWindow(hLocalWnd, SW_SHOW); 
     471    loop(); 
    472472} 
    473473 
     
    496496    const int DEFAULT_WINDOW_HEIGHT = 200; 
    497497 
    498     TCHAR ClassName[] = _T("i3.WNDCLASS::lpszClassName.InputWindow"); //  <- rule required 
     498    TCHAR ClassName[] = _T("i3/WNDCLASS::lpszClassName/InputWindow"); //  <- rule required 
    499499    int nCmdShow = SW_SHOW; 
    500500 
     
    531531                    dwDefaultExStyle, 
    532532                    ClassName, 
    533                     _T("i3 Title: InputWindow"), //  <- need rule 
     533                    _T("i3/InputWindow"), //  <- need rule 
    534534                    dwDefaultStyle, 
    535535                    30, //CW_USEDEFAULT, 
  • lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.h

    r35623 r35968  
    1818 
    1919    void createGui(); 
    20     void loop(); 
     20    void run(); 
    2121 
    2222    void OnActivate(HWND hWnd, UINT state, HWND hWndActDeact, BOOL fMinimized);