]> git.saurik.com Git - wxWidgets.git/commitdiff
Translucency --> Transparent
authorRobin Dunn <robin@alldunn.com>
Mon, 17 Jul 2006 21:30:08 +0000 (21:30 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 17 Jul 2006 21:30:08 +0000 (21:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/latex/wx/tlw.tex
include/wx/mac/carbon/toplevel.h
include/wx/msw/toplevel.h
include/wx/toplevel.h
src/aui/framemanager.cpp
src/mac/carbon/toplevel.cpp
src/msw/toplevel.cpp
wxPython/src/_toplvl.i

index 13f25fa595be44a69648ac55ac38ea911800fe73..a63f0a833dfc79744a241f50ba7f93e6bc823230 100644 (file)
@@ -161,7 +161,7 @@ All (GUI):
 - 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:
index ee1ba586baeba1ea5fbd2021b93f6a1688b013d9..2b7d1f647bf7021fb77db7b0a5d12da06bf7d0a8 100644 (file)
@@ -29,15 +29,15 @@ applicable for the two classes above.
 
 \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}
@@ -281,19 +281,20 @@ Sets the window title.
 \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.
 
 
 
index cdffba933f7ed979e2c122d33152769ef3fde5ef..90c340076b5a24bab1da8deac3b36a3b62142918 100644 (file)
@@ -69,8 +69,8 @@ public:
     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
index f8d064c24bb37814cb2bfcf137c768fdee497404..64359f658d10943442ddf683f5b17c2cad8e8842 100644 (file)
@@ -71,8 +71,8 @@ public:
     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
index 50409bb5ce9e971dfbf33e41be664e7c824ac799..8881631c5c91b83733b0ab3c1c81d3a04e91b433 100644 (file)
@@ -197,8 +197,8 @@ public:
     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
index 0fdb1d9fd4696a789b44bdb0ef0bc028ffdf03b3..945d2d8c35863e5f63a11034c7cbd2a401fdd8e0 100644 (file)
@@ -495,7 +495,7 @@ void wxFrameManager::SetManagedWindow(wxWindow* frame)
     }
 #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 |
@@ -523,7 +523,7 @@ void wxFrameManager::SetManagedWindow(wxWindow* frame)
     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;
@@ -1840,7 +1840,7 @@ void wxFrameManager::Update()
                 // 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;
@@ -2468,7 +2468,7 @@ void wxFrameManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event))
     }
 
     m_hint_fadeamt += 5;
-    m_hint_wnd->SetTranslucency(m_hint_fadeamt);
+    m_hint_wnd->SetTransparent(m_hint_fadeamt);
 }
 
 void wxFrameManager::ShowHint(const wxRect& rect)
@@ -2491,7 +2491,7 @@ 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();
         
@@ -2505,7 +2505,7 @@ void wxFrameManager::ShowHint(const wxRect& rect)
         }
     }
 
-    else  // Not using a translucent hint window...
+    else  // Not using a transparent hint window...
     {
         
         if (m_last_hint != rect)
@@ -2559,7 +2559,7 @@ void wxFrameManager::HideHint()
     // 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;
@@ -2666,7 +2666,7 @@ void wxFrameManager::OnFloatingPaneMoveStart(wxWindow* wnd)
     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)
@@ -2765,7 +2765,7 @@ void wxFrameManager::OnFloatingPaneMoved(wxWindow* wnd)
         pane.floating_pos = pane.frame->GetPosition();
 
         if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
-            pane.frame->SetTranslucency(255);
+            pane.frame->SetTransparent(255);
     }
 
     Update();
index 5d77fdc67328b4e3b71ed302c222b9f6e560b017..2e4cd6eb3ed37881b90c37cbc118b489b2ab0b64 100644 (file)
@@ -1432,7 +1432,7 @@ bool wxTopLevelWindowMac::IsFullScreen() const
 }
 
 
-bool wxTopLevelWindowMac::SetTranslucency(int alpha)
+bool wxTopLevelWindowMac::SetTransparent(wxByte alpha)
 {
     WindowRef handle = GetControlOwner((OpaqueControlRef*)GetHandle());
     OSStatus result = SetWindowAlpha(handle, float(alpha)/255.0);
@@ -1440,7 +1440,7 @@ bool wxTopLevelWindowMac::SetTranslucency(int alpha)
 }
 
 
-bool wxTopLevelWindowMac::CanSetTranslucency()
+bool wxTopLevelWindowMac::CanSetTransparent()
 {
     return true;
 }
index e0a489a759df48741bb343f53225adf22fde8228..bdd1e301c4c173f2316c82beb614f7bf98331c67 100644 (file)
@@ -1045,14 +1045,11 @@ void wxTopLevelWindowMSW::RequestUserAttention(int flags)
 
 // ---------------------------------------------------------------------------
 
-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"));
@@ -1079,7 +1076,7 @@ bool wxTopLevelWindowMSW::SetTranslucency(int alpha)
     return pSetLayeredWindowAttributes(GetHwnd(), 0, (BYTE)alpha, LWA_ALPHA) != 0;   
 }
 
-bool wxTopLevelWindowMSW::CanSetTranslucency()
+bool wxTopLevelWindowMSW::CanSetTransparent()
 {
     // The API is available on win2k and above
     
index c9aa280142cf51a934a720e5b3b2949b509636bb..a99ce0c36291beb614c81e45c0cb77ccdf0adad2 100644 (file)
@@ -171,8 +171,8 @@ public:
     }
 #endif
 
-    virtual bool SetTranslucency(int alpha); 
-    virtual bool CanSetTranslucency();
+    virtual bool SetTransparent(byte alpha); 
+    virtual bool CanSetTransparent();
 
 };