コード例 #1
0
  void set_text(const TCHAR *_text) {
    assert_none_locked();
    assert_thread();

    text = _text;
    invalidate();
  }
コード例 #2
0
void
Window::created(HWND _hWnd)
{
  assert(hWnd == NULL);
  hWnd = _hWnd;

  assert_thread();
}
コード例 #3
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  /**
   * Specifies whether this window can get user input.
   */
  void set_enabled(bool enabled) {
    assert_thread();

#ifdef ENABLE_SDL
    // XXX
#else
    ::EnableWindow(hWnd, enabled);
#endif
  }
コード例 #4
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void set_capture() {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    // XXX
#else
    ::SetCapture(hWnd);
#endif
  }
コード例 #5
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void release_capture() {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    // XXX
#else
    ::ReleaseCapture();
#endif
  }
コード例 #6
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void kill_timer(timer_t id)
  {
    assert_thread();

#ifdef ENABLE_SDL
    delete id;
#else
    ::KillTimer(hWnd, id);
#endif
  }
コード例 #7
0
ファイル: SingleWindow.cpp プロジェクト: Mrdini/XCSoar
void
SingleWindow::CancelDialog()
{
  assert_thread();

  assert(!dialogs.empty());

  Window *dialog = dialogs.top();
  dialog->reset();
}
コード例 #8
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void send_command(const Window &from) {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    // XXX
#else /* !ENABLE_SDL */
    ::SendMessage(hWnd, WM_COMMAND, (WPARAM)0, (LPARAM)from.hWnd);
#endif /* !ENABLE_SDL */
  }
コード例 #9
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void set_font(const Font &font) {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    // XXX
#else
    ::SendMessage(hWnd, WM_SETFONT,
                  (WPARAM)font.native(), MAKELPARAM(TRUE,0));
#endif
  }
コード例 #10
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  timer_t set_timer(unsigned id, unsigned ms)
  {
    assert_thread();

#ifdef ENABLE_SDL
    return new SDLTimer(*this, ms);
#else
    ::SetTimer(hWnd, id, ms, NULL);
    return id;
#endif
  }
コード例 #11
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void show_on_top() {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    bring_to_top();
    show();
#else
    ::SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0,
                   SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE);
#endif
  }
コード例 #12
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  /**
   * Like move(), but does not trigger a synchronous redraw.  The
   * caller is responsible for redrawing.
   */
  void fast_move(int left, int top, unsigned width, unsigned height) {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    move(left, top, width, height);
#else /* !ENABLE_SDL */
    ::SetWindowPos(hWnd, NULL, left, top, width, height,
                   SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_DEFERERASE |
                   SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
#endif
  }
コード例 #13
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void move(int left, int top, unsigned width, unsigned height) {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    // XXX
#else /* !ENABLE_SDL */
    ::SetWindowPos(hWnd, NULL, left, top, width, height,
                   SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
    // XXX store new size?
#endif
  }
コード例 #14
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void move(int left, int top) {
    assert_none_locked();
    assert_thread();

#ifdef ENABLE_SDL
    this->left = left;
    this->top = top;
#else
    ::SetWindowPos(hWnd, NULL, left, top, 0, 0,
                   SWP_NOSIZE | SWP_NOZORDER |
                   SWP_NOACTIVATE | SWP_NOOWNERZORDER);
#endif
  }
コード例 #15
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  /**
   * Like hide(), but does not trigger a synchronous redraw of the
   * parent window's background.
   */
  void fast_hide() {
    assert_thread();

#ifdef ENABLE_SDL
    hide();
#else
    ::SetWindowPos(hWnd, NULL, 0, 0, 0, 0,
                   SWP_HIDEWINDOW |
                   SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_DEFERERASE |
                   SWP_NOMOVE | SWP_NOSIZE |
                   SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
#endif
  }
コード例 #16
0
ファイル: TextWindow.hpp プロジェクト: macsux/XCSoar
    void set_text(const TCHAR *_text) {
        assert_none_locked();
        assert_thread();

#ifndef USE_GDI
        if (_text != NULL)
            text = _text;
        else
            text.clear();
        invalidate();
#else /* USE_GDI */
        ::SetWindowText(hWnd, _text);
#endif /* USE_GDI */
    }
コード例 #17
0
  bool is_down() const {
    assert_none_locked();
    assert_thread();

    return (Button_GetState(hWnd) & BST_PUSHED) != 0;
  }
コード例 #18
0
ファイル: signal.hpp プロジェクト: AtnNn/rethinkdb
 /* True if somebody has called `pulse()`. */
 bool is_pulsed() const {
     assert_thread();
     return pulsed;
 }
コード例 #19
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void EndPaint(PAINTSTRUCT *ps) {
    assert_thread();

    ::EndPaint(hWnd, ps);
  }
コード例 #20
0
ファイル: store_view.hpp プロジェクト: B-sound/rethinkdb
 virtual ~store_view_t() {
     assert_thread();
 }
コード例 #21
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  HDC BeginPaint(PAINTSTRUCT *ps) {
    assert_thread();

    return ::BeginPaint(hWnd, ps);
  }
コード例 #22
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void set_userdata(void *value)
  {
    assert_thread();

    ::SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)value);
  }
コード例 #23
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void bring_to_top() {
    assert_none_locked();
    assert_thread();

    ::BringWindowToTop(hWnd);
  }
コード例 #24
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  WNDPROC set_wndproc(WNDPROC wndproc)
  {
    assert_thread();

    return (WNDPROC)::SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)wndproc);
  }
コード例 #25
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void show() {
    assert_thread();

    ::ShowWindow(hWnd, SW_SHOW);
  }
コード例 #26
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void hide() {
    assert_thread();

    ::ShowWindow(hWnd, SW_HIDE);
  }
コード例 #27
0
ファイル: Window.hpp プロジェクト: Plantain/XCSoar
  void set_focus() {
    assert_none_locked();
    assert_thread();

    ::SetFocus(hWnd);
  }
コード例 #28
0
ファイル: ButtonWindow.hpp プロジェクト: Plantain/XCSoar
  void set_text(const TCHAR *text) {
    assert_none_locked();
    assert_thread();

    ::SetWindowText(hWnd, text);
  }
コード例 #29
0
ファイル: activity_logger.hpp プロジェクト: isidorn/test2
 void add(const std::string &msg) {
     assert_thread();
     events.push_back(msg);
 }
コード例 #30
0
ファイル: promise.hpp プロジェクト: AVGP/rethinkdb
 const val_t &wait() const {
     assert_thread();
     cond.wait_lazily_unordered();
     return *value.get();
 }