This keyword is not expanded by Git which means it's not replaced with the correct revision value in the releases made using git-based scripts and it's confusing to have lines with unexpanded "$Id$" in the released files. As expanding them with Git is not that simple (it could be done with git archive and export-subst attribute) and there are not many benefits in having them in the first place, just remove all these lines. If nothing else, this will make an eventual transition to Git simpler. Closes #14487. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
110 lines
3.0 KiB
C++
110 lines
3.0 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/os2/statbox.cpp
|
|
// Purpose: wxStaticBox
|
|
// Author: David Webster
|
|
// Modified by:
|
|
// Created: ??/??/98
|
|
// Copyright: (c) David Webster
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// For compilers that support precompilation, includes "wx.h".
|
|
#include "wx/wxprec.h"
|
|
|
|
#include "wx/statbox.h"
|
|
|
|
#ifndef WX_PRECOMP
|
|
#include "wx/app.h"
|
|
#include "wx/dcclient.h"
|
|
#include "wx/window.h"
|
|
#endif
|
|
|
|
#include "wx/os2/private.h"
|
|
|
|
bool wxStaticBox::Create( wxWindow* pParent,
|
|
wxWindowID vId,
|
|
const wxString& rsLabel,
|
|
const wxPoint& rPos,
|
|
const wxSize& rSize,
|
|
long lStyle,
|
|
const wxString& rsName )
|
|
{
|
|
if(!CreateControl( pParent
|
|
,vId
|
|
,rPos
|
|
,rSize
|
|
,lStyle
|
|
,wxDefaultValidator
|
|
,rsName
|
|
))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
wxPoint vPos(0,0);
|
|
wxSize vSize(0,0);
|
|
|
|
if (!OS2CreateControl( wxT("STATIC")
|
|
,SS_GROUPBOX
|
|
,vPos
|
|
,vSize
|
|
,rsLabel
|
|
))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
//
|
|
// To be transparent we should have the same colour as the parent as well
|
|
//
|
|
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
|
|
|
LONG lColor = (LONG)wxBLACK->GetPixel();
|
|
::WinSetPresParam( m_hWnd
|
|
,PP_FOREGROUNDCOLOR
|
|
,sizeof(LONG)
|
|
,(PVOID)&lColor
|
|
);
|
|
|
|
lColor = (LONG)m_backgroundColour.GetPixel();
|
|
::WinSetPresParam( m_hWnd
|
|
,PP_BACKGROUNDCOLOR
|
|
,sizeof(LONG)
|
|
,(PVOID)&lColor
|
|
);
|
|
SetSize( rPos.x
|
|
,rPos.y
|
|
,rSize.x
|
|
,rSize.y
|
|
);
|
|
return true;
|
|
} // end of wxStaticBox::Create
|
|
|
|
wxSize wxStaticBox::DoGetBestSize() const
|
|
{
|
|
int nCx;
|
|
int nCy;
|
|
int wBox;
|
|
|
|
nCx = GetCharWidth();
|
|
nCy = GetCharHeight();
|
|
GetTextExtent( wxGetWindowText(m_hWnd)
|
|
,&wBox
|
|
,NULL
|
|
);
|
|
wBox += 3 * nCx;
|
|
|
|
int hBox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy);
|
|
|
|
return wxSize( wBox
|
|
,hBox
|
|
);
|
|
} // end of wxStaticBox::DoGetBestSize
|
|
|
|
MRESULT wxStaticBox::OS2WindowProc( WXUINT nMsg,
|
|
WXWPARAM wParam,
|
|
WXLPARAM lParam )
|
|
{
|
|
return wxControl::OS2WindowProc(nMsg, wParam, lParam);
|
|
} // end of wxStaticBox::OS2WindowProc
|