- Fixed problem with zoom setting in print preview.
- Moved wxRichTextCtrl from the advanced library to its own.
- wxNB_HITTEST_* flags renamed to wxBK_HITTEST_* to serve all book controls.
-- Added wxTopLevelWindow::SetTranslucency and CanSetTranslucency, with
+- Added wxTopLevelWindow::SetTransparent and CanSetTransparent, with
implementations (so far) for wxMSW and wxMac.
wxMSW:
\latexignore{\rtfignore{\wxheading{Members}}}
-\membersection{wxTopLevelWindow::CanSetTranslucency}\label{wxtoplevelwindowcansettranslucency}
+\membersection{wxTopLevelWindow::CanSetTransparent}\label{wxtoplevelwindowcansettransparent}
-\func{virtual bool}{CanSetTranslucency}{\void}
+\func{virtual bool}{CanSetTransparent}{\void}
Returns \true if the platform supports making the window translucent.
\wxheading{See also}
-\helpref{wxTopLevelWindow::SetTranslucency}{wxtoplevelwindowsettranslucency}
+\helpref{wxTopLevelWindow::SetTransparent}{wxtoplevelwindowsettransparent}
\membersection{wxTopLevelWindow::GetIcon}\label{wxtoplevelwindowgeticon}
\helpref{wxTopLevelWindow::GetTitle}{wxtoplevelwindowgettitle}
-\membersection{wxTopLevelWindow::SetTranslucency}\label{wxtoplevelwindowsettranslucency}
+\membersection{wxTopLevelWindow::SetTransparent}\label{wxtoplevelwindowsettransparent}
-\func{virtual bool}{SetTranslucency}{\param{int }{ alpha}}
+\func{virtual bool}{SetTransparent}{\param{int }{ alpha}}
If the platform supports it will set the window to be translucent
\wxheading{Parameters}
\docparam{alpha}{Determines how opaque or transparent the window will
- be. A value of 0 sets the window to be fully transparent, and a
- value of 255 sets the window to be fully opaque.}
+ be, if the platform supports the opreration. A value of 0 sets the
+ window to be fully transparent, and a value of 255 sets the window
+ to be fully opaque.}
-Returns \true if the translucency was successfully changed.
+Returns \true if the transparency was successfully changed.
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) ;
virtual bool IsFullScreen() const ;
- virtual bool SetTranslucency(int alpha);
- virtual bool CanSetTranslucency();
+ virtual bool SetTransparent(wxByte alpha);
+ virtual bool CanSetTransparent();
// implementation from now on
bool EnableCloseButton(bool enable = true);
// Set window transparency if the platform supports it
- virtual bool SetTranslucency(int alpha);
- virtual bool CanSetTranslucency();
+ virtual bool SetTransparent(wxByte alpha);
+ virtual bool CanSetTransparent();
// implementation from now on
void CenterOnScreen(int dir = wxBOTH) { CentreOnScreen(dir); }
// Set window transparency if the platform supports it
- virtual bool SetTranslucency(int WXUNUSED(alpha)) { return false; }
- virtual bool CanSetTranslucency() { return false; }
+ virtual bool SetTransparent(wxByte WXUNUSED(alpha)) { return false; }
+ virtual bool CanSetTransparent() { return false; }
// implementation only from now on
}
#endif
- // Make a window to use for a translucent hint
+ // Make a window to use for a transparent hint
#if defined(__WXMSW__)
m_hint_wnd = new wxFrame(m_frame, -1, wxEmptyString, wxDefaultPosition, wxSize(1,1),
wxFRAME_TOOL_WINDOW |
p->SetBackgroundColour(*wxBLUE);
#endif
- if (m_hint_wnd && !m_hint_wnd->CanSetTranslucency())
+ if (m_hint_wnd && !m_hint_wnd->CanSetTransparent())
{
m_hint_wnd->Close();
m_hint_wnd = NULL;
// window should have this style by default
if (m_action == actionDragFloatingPane &&
(m_flags & wxAUI_MGR_TRANSPARENT_DRAG))
- frame->SetTranslucency(150);
+ frame->SetTransparent(150);
frame->SetPaneWindow(p);
p.frame = frame;
}
m_hint_fadeamt += 5;
- m_hint_wnd->SetTranslucency(m_hint_fadeamt);
+ m_hint_wnd->SetTransparent(m_hint_fadeamt);
}
void wxFrameManager::ShowHint(const wxRect& rect)
if (m_action == actionDragFloatingPane && m_action_window)
m_action_window->SetFocus();
- m_hint_wnd->SetTranslucency(initial_fade);
+ m_hint_wnd->SetTransparent(initial_fade);
m_hint_wnd->SetSize(rect);
m_hint_wnd->Raise();
}
}
- else // Not using a translucent hint window...
+ else // Not using a transparent hint window...
{
if (m_last_hint != rect)
// hides a transparent window hint, if there is one
if (m_hint_wnd)
{
- m_hint_wnd->SetTranslucency(0);
+ m_hint_wnd->SetTransparent(0);
m_hint_fadetimer.Stop();
m_last_hint = wxRect();
return;
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
- pane.frame->SetTranslucency(150);
+ pane.frame->SetTransparent(150);
}
void wxFrameManager::OnFloatingPaneMoving(wxWindow* wnd)
pane.floating_pos = pane.frame->GetPosition();
if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
- pane.frame->SetTranslucency(255);
+ pane.frame->SetTransparent(255);
}
Update();
}
-bool wxTopLevelWindowMac::SetTranslucency(int alpha)
+bool wxTopLevelWindowMac::SetTransparent(wxByte alpha)
{
WindowRef handle = GetControlOwner((OpaqueControlRef*)GetHandle());
OSStatus result = SetWindowAlpha(handle, float(alpha)/255.0);
}
-bool wxTopLevelWindowMac::CanSetTranslucency()
+bool wxTopLevelWindowMac::CanSetTransparent()
{
return true;
}
// ---------------------------------------------------------------------------
-bool wxTopLevelWindowMSW::SetTranslucency(int alpha)
+bool wxTopLevelWindowMSW::SetTransparent(wxByte alpha)
{
typedef DWORD (WINAPI *PSETLAYEREDWINDOWATTR)(HWND, DWORD, BYTE, DWORD);
static PSETLAYEREDWINDOWATTR pSetLayeredWindowAttributes = NULL;
- if (alpha < 0) alpha = 0;
- if (alpha > 255) alpha = 255;
-
if ( pSetLayeredWindowAttributes == NULL )
{
wxDynamicLibrary dllUser32(_T("user32.dll"));
return pSetLayeredWindowAttributes(GetHwnd(), 0, (BYTE)alpha, LWA_ALPHA) != 0;
}
-bool wxTopLevelWindowMSW::CanSetTranslucency()
+bool wxTopLevelWindowMSW::CanSetTransparent()
{
// The API is available on win2k and above
}
#endif
- virtual bool SetTranslucency(int alpha);
- virtual bool CanSetTranslucency();
+ virtual bool SetTransparent(byte alpha);
+ virtual bool CanSetTransparent();
};