Changeset 35968
- Timestamp:
- 11/23/09 01:49:35 (4 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 4 modified
-
configure.ac (modified) (2 diffs)
-
src/gui-windows/CompletionWindowPlatform.cpp (modified) (2 diffs)
-
src/gui-windows/InputWindowPlatform.cpp (modified) (4 diffs)
-
src/gui-windows/InputWindowPlatform.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/configure.ac
r35953 r35968 90 90 GCH_LANG="objective-c++-header" 91 91 CXXFLAGS="$CXXFLAGS -xobjective-c++" 92 #CXXFLAGS="$CXXFLAGS $OBJCFLAGS -xobjective-c++" 92 93 LDFLAGS="$LDFLAGS -xnone -framework Cocoa" 93 94 ;; … … 96 97 GCH_LANG="objective-c++-header" 97 98 CXXFLAGS="$CXXFLAGS -xobjective-c++" 99 #CXXFLAGS="$CXXFLAGS $OBJCFLAGS -xobjective-c++" 98 100 LDFLAGS="$LDFLAGS -xnone" 99 101 -
lang/objective-cplusplus/i3/trunk/src/gui-windows/CompletionWindowPlatform.cpp
r34909 r35968 22 22 template <> 23 23 void 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); 24 88 } 25 89 … … 27 91 void CompletionWindowPlatform<CompletionWindow>::run() { 28 92 createUI(); 93 UpdateWindow(hLocalWnd); 94 ShowWindow(hLocalWnd, SW_SHOW); 29 95 loop(); 30 96 } -
lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.cpp
r35904 r35968 421 421 template <> 422 422 size_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); 434 434 435 435 // debug << boost::basic_format<char>( … … 465 465 466 466 template <> 467 void InputWindowPlatform<InputWindow>::loop() { 467 void InputWindowPlatform<InputWindow>::run() { 468 createGui(); 468 469 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(); 472 472 } 473 473 … … 496 496 const int DEFAULT_WINDOW_HEIGHT = 200; 497 497 498 TCHAR ClassName[] = _T("i3 .WNDCLASS::lpszClassName.InputWindow"); // <- rule required498 TCHAR ClassName[] = _T("i3/WNDCLASS::lpszClassName/InputWindow"); // <- rule required 499 499 int nCmdShow = SW_SHOW; 500 500 … … 531 531 dwDefaultExStyle, 532 532 ClassName, 533 _T("i3 Title:InputWindow"), // <- need rule533 _T("i3/InputWindow"), // <- need rule 534 534 dwDefaultStyle, 535 535 30, //CW_USEDEFAULT, -
lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.h
r35623 r35968 18 18 19 19 void createGui(); 20 void loop();20 void run(); 21 21 22 22 void OnActivate(HWND hWnd, UINT state, HWND hWndActDeact, BOOL fMinimized);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)