Minor decorations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -995,7 +995,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
|
|||||||
style2 |= wxLC_SINGLE_SEL;
|
style2 |= wxLC_SINGLE_SEL;
|
||||||
|
|
||||||
m_list = new wxFileCtrl( this, ID_LIST_CTRL,
|
m_list = new wxFileCtrl( this, ID_LIST_CTRL,
|
||||||
_T(""), ms_lastShowHidden,
|
wxEmptyString, ms_lastShowHidden,
|
||||||
wxDefaultPosition, wxSize(540,200),
|
wxDefaultPosition, wxSize(540,200),
|
||||||
style2);
|
style2);
|
||||||
|
|
||||||
|
@@ -82,7 +82,7 @@ IMPLEMENT_CLASS(wxPostScriptPrintNativeData, wxPrintNativeDataBase)
|
|||||||
|
|
||||||
wxPostScriptPrintNativeData::wxPostScriptPrintNativeData()
|
wxPostScriptPrintNativeData::wxPostScriptPrintNativeData()
|
||||||
{
|
{
|
||||||
m_previewCommand = wxT("");
|
m_previewCommand = wxEmptyString;
|
||||||
#ifdef __VMS__
|
#ifdef __VMS__
|
||||||
m_printerCommand = wxT("print");
|
m_printerCommand = wxT("print");
|
||||||
m_printerOptions = wxT("/nonotify/queue=psqueue");
|
m_printerOptions = wxT("/nonotify/queue=psqueue");
|
||||||
@@ -91,14 +91,14 @@ wxPostScriptPrintNativeData::wxPostScriptPrintNativeData()
|
|||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
m_printerCommand = wxT("print");
|
m_printerCommand = wxT("print");
|
||||||
m_printerOptions = wxT("");
|
m_printerOptions = wxEmptyString;
|
||||||
m_afmPath = wxT("c:\\windows\\system\\");
|
m_afmPath = wxT("c:\\windows\\system\\");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__VMS__) && !defined(__WXMSW__)
|
#if !defined(__VMS__) && !defined(__WXMSW__)
|
||||||
m_printerCommand = wxT("lpr");
|
m_printerCommand = wxT("lpr");
|
||||||
m_printerOptions = wxT("");
|
m_printerOptions = wxEmptyString;
|
||||||
m_afmPath = wxT("");
|
m_afmPath = wxEmptyString);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_printerScaleX = 1.0;
|
m_printerScaleX = 1.0;
|
||||||
@@ -565,7 +565,7 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
|
|||||||
wxStringTokenizer tok2( tmp, wxT(" ") );
|
wxStringTokenizer tok2( tmp, wxT(" ") );
|
||||||
tmp = tok2.GetNextToken(); // "printer"
|
tmp = tok2.GetNextToken(); // "printer"
|
||||||
tmp = tok2.GetNextToken(); // "hp_deskjet930c"
|
tmp = tok2.GetNextToken(); // "hp_deskjet930c"
|
||||||
tmp = wxT("");
|
tmp = wxEmptyString;
|
||||||
while (tok2.HasMoreTokens())
|
while (tok2.HasMoreTokens())
|
||||||
{
|
{
|
||||||
tmp += tok2.GetNextToken();
|
tmp += tok2.GetNextToken();
|
||||||
@@ -629,7 +629,7 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
|
|||||||
|
|
||||||
item13->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
|
item13->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
|
||||||
|
|
||||||
m_printerCommandText = new wxTextCtrl( this, wxPRINTID_COMMAND, wxT(""), wxDefaultPosition, wxSize(160,wxDefaultCoord) );
|
m_printerCommandText = new wxTextCtrl( this, wxPRINTID_COMMAND, wxEmptyString, wxDefaultPosition, wxSize(160,wxDefaultCoord) );
|
||||||
item13->Add( m_printerCommandText, 0, wxALIGN_CENTER|wxALL, 5 );
|
item13->Add( m_printerCommandText, 0, wxALIGN_CENTER|wxALL, 5 );
|
||||||
|
|
||||||
item10->Add( item13, 0, wxALIGN_CENTER|wxALL, 0 );
|
item10->Add( item13, 0, wxALIGN_CENTER|wxALL, 0 );
|
||||||
@@ -641,7 +641,7 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
|
|||||||
|
|
||||||
item16->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
|
item16->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
|
||||||
|
|
||||||
m_printerOptionsText = new wxTextCtrl( this, wxPRINTID_OPTIONS, wxT(""), wxDefaultPosition, wxSize(160,wxDefaultCoord) );
|
m_printerOptionsText = new wxTextCtrl( this, wxPRINTID_OPTIONS, wxEmptyString, wxDefaultPosition, wxSize(160,wxDefaultCoord) );
|
||||||
item16->Add( m_printerOptionsText, 0, wxALIGN_CENTER|wxALL, 5 );
|
item16->Add( m_printerOptionsText, 0, wxALIGN_CENTER|wxALL, 5 );
|
||||||
|
|
||||||
item10->Add( item16, 0, wxALIGN_CENTER|wxALL, 0 );
|
item10->Add( item16, 0, wxALIGN_CENTER|wxALL, 0 );
|
||||||
@@ -732,7 +732,7 @@ bool wxGenericPrintSetupDialog::TransferDataFromWindow()
|
|||||||
long id = m_printerListCtrl->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
long id = m_printerListCtrl->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
{
|
{
|
||||||
m_printData.SetPrinterName( wxT("") );
|
m_printData.SetPrinterName( wxEmptyString );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -420,7 +420,7 @@ void wxTreeTextCtrl::Finish()
|
|||||||
wxPendingDelete.Append(this);
|
wxPendingDelete.Append(this);
|
||||||
|
|
||||||
m_finished = true;
|
m_finished = true;
|
||||||
|
|
||||||
m_owner->SetFocusIgnoringChildren();
|
m_owner->SetFocusIgnoringChildren();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -914,7 +914,7 @@ void wxGenericTreeCtrl::SetWindowStyle(const long styles)
|
|||||||
|
|
||||||
wxString wxGenericTreeCtrl::GetItemText(const wxTreeItemId& item) const
|
wxString wxGenericTreeCtrl::GetItemText(const wxTreeItemId& item) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( item.IsOk(), wxT(""), wxT("invalid tree item") );
|
wxCHECK_MSG( item.IsOk(), wxEmptyString, wxT("invalid tree item") );
|
||||||
|
|
||||||
return ((wxGenericTreeItem*) item.m_pItem)->GetText();
|
return ((wxGenericTreeItem*) item.m_pItem)->GetText();
|
||||||
}
|
}
|
||||||
|
@@ -108,12 +108,12 @@ bool wxWebKitCtrl::Create(wxWindow *parent,
|
|||||||
|
|
||||||
m_currentURL = strURL;
|
m_currentURL = strURL;
|
||||||
//m_pageTitle = _("Untitled Page");
|
//m_pageTitle = _("Untitled Page");
|
||||||
|
|
||||||
//still needed for wxCocoa??
|
//still needed for wxCocoa??
|
||||||
/*
|
/*
|
||||||
int width, height;
|
int width, height;
|
||||||
wxSize sizeInstance;
|
wxSize sizeInstance;
|
||||||
if (size.x == -1 || size.y == -1)
|
if (size.x == wxDefaultCoord || size.y == wxDefaultCoord)
|
||||||
{
|
{
|
||||||
m_parent->GetClientSize(&width, &height);
|
m_parent->GetClientSize(&width, &height);
|
||||||
sizeInstance.x = width;
|
sizeInstance.x = width;
|
||||||
@@ -124,12 +124,12 @@ bool wxWebKitCtrl::Create(wxWindow *parent,
|
|||||||
sizeInstance.x = size.x;
|
sizeInstance.x = size.x;
|
||||||
sizeInstance.y = size.y;
|
sizeInstance.y = size.y;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// now create and attach WebKit view...
|
// now create and attach WebKit view...
|
||||||
#ifdef __WXCOCOA__
|
#ifdef __WXCOCOA__
|
||||||
wxControl::Create(parent, m_windowID, pos, sizeInstance, style , validator , name);
|
wxControl::Create(parent, m_windowID, pos, sizeInstance, style , validator , name);
|
||||||
SetSize(pos.x, pos.y, sizeInstance.x, sizeInstance.y);
|
SetSize(pos.x, pos.y, sizeInstance.x, sizeInstance.y);
|
||||||
|
|
||||||
wxTopLevelWindowCocoa *topWin = wxDynamicCast(this, wxTopLevelWindowCocoa);
|
wxTopLevelWindowCocoa *topWin = wxDynamicCast(this, wxTopLevelWindowCocoa);
|
||||||
NSWindow* nsWin = topWin->GetNSWindow();
|
NSWindow* nsWin = topWin->GetNSWindow();
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
@@ -149,17 +149,17 @@ bool wxWebKitCtrl::Create(wxWindow *parent,
|
|||||||
wxControl::Create(parent, m_windowID, pos, size, style , validator , name);
|
wxControl::Create(parent, m_windowID, pos, size, style , validator , name);
|
||||||
WebInitForCarbon();
|
WebInitForCarbon();
|
||||||
HIWebViewCreate( m_peer->GetControlRefAddr() );
|
HIWebViewCreate( m_peer->GetControlRefAddr() );
|
||||||
|
|
||||||
m_webView = (WebView*) HIWebViewGetWebView( m_peer->GetControlRef() );
|
m_webView = (WebView*) HIWebViewGetWebView( m_peer->GetControlRef() );
|
||||||
MacPostControlCreate(pos, size);
|
MacPostControlCreate(pos, size);
|
||||||
HIViewSetVisible( m_peer->GetControlRef(), true );
|
HIViewSetVisible( m_peer->GetControlRef(), true );
|
||||||
[m_webView setHidden:false];
|
[m_webView setHidden:false];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Register event listener interfaces
|
// Register event listener interfaces
|
||||||
MyFrameLoadMonitor* myFrameLoadMonitor = [[MyFrameLoadMonitor alloc] initWithWxWindow: (wxWindow*)this];
|
MyFrameLoadMonitor* myFrameLoadMonitor = [[MyFrameLoadMonitor alloc] initWithWxWindow: (wxWindow*)this];
|
||||||
[m_webView setFrameLoadDelegate:myFrameLoadMonitor];
|
[m_webView setFrameLoadDelegate:myFrameLoadMonitor];
|
||||||
|
|
||||||
LoadURL(m_currentURL);
|
LoadURL(m_currentURL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ void wxWebKitCtrl::LoadURL(const wxString &url)
|
|||||||
{
|
{
|
||||||
if( !m_webView )
|
if( !m_webView )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[[m_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:wxNSStringWithWxString(url)]]];
|
[[m_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:wxNSStringWithWxString(url)]]];
|
||||||
|
|
||||||
m_currentURL = url;
|
m_currentURL = url;
|
||||||
@@ -186,69 +186,69 @@ void wxWebKitCtrl::LoadURL(const wxString &url)
|
|||||||
bool wxWebKitCtrl::CanGoBack(){
|
bool wxWebKitCtrl::CanGoBack(){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return [m_webView canGoBack];
|
return [m_webView canGoBack];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebKitCtrl::CanGoForward(){
|
bool wxWebKitCtrl::CanGoForward(){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return [m_webView canGoForward];
|
return [m_webView canGoForward];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebKitCtrl::GoBack(){
|
bool wxWebKitCtrl::GoBack(){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool result = [(WebView*)m_webView goBack];
|
bool result = [(WebView*)m_webView goBack];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebKitCtrl::GoForward(){
|
bool wxWebKitCtrl::GoForward(){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool result = [(WebView*)m_webView goForward];
|
bool result = [(WebView*)m_webView goForward];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebKitCtrl::Reload(){
|
void wxWebKitCtrl::Reload(){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[[m_webView mainFrame] reload];
|
[[m_webView mainFrame] reload];
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebKitCtrl::Stop(){
|
void wxWebKitCtrl::Stop(){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[[m_webView mainFrame] stopLoading];
|
[[m_webView mainFrame] stopLoading];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebKitCtrl::CanGetPageSource(){
|
bool wxWebKitCtrl::CanGetPageSource(){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
|
WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
|
||||||
return ( [[dataSource representation] canProvideDocumentSource] );
|
return ( [[dataSource representation] canProvideDocumentSource] );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxWebKitCtrl::GetPageSource(){
|
wxString wxWebKitCtrl::GetPageSource(){
|
||||||
|
|
||||||
if (CanGetPageSource()){
|
if (CanGetPageSource()){
|
||||||
WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
|
WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
|
||||||
return wxStringWithNSString( [[dataSource representation] documentSource] );
|
return wxStringWithNSString( [[dataSource representation] documentSource] );
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxT("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebKitCtrl::SetPageSource(wxString& source, const wxString& baseUrl){
|
void wxWebKitCtrl::SetPageSource(wxString& source, const wxString& baseUrl){
|
||||||
if ( !m_webView )
|
if ( !m_webView )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (CanGetPageSource()){
|
if (CanGetPageSource()){
|
||||||
[[m_webView mainFrame] loadHTMLString:(NSString*)wxNSStringWithWxString( source ) baseURL:[NSURL URLWithString:wxNSStringWithWxString( baseUrl )]];
|
[[m_webView mainFrame] loadHTMLString:(NSString*)wxNSStringWithWxString( source ) baseURL:[NSURL URLWithString:wxNSStringWithWxString( baseUrl )]];
|
||||||
}
|
}
|
||||||
@@ -258,19 +258,19 @@ void wxWebKitCtrl::SetPageSource(wxString& source, const wxString& baseUrl){
|
|||||||
void wxWebKitCtrl::OnSize(wxSizeEvent &event){
|
void wxWebKitCtrl::OnSize(wxSizeEvent &event){
|
||||||
// This is a nasty hack because WebKit seems to lose its position when it is embedded
|
// This is a nasty hack because WebKit seems to lose its position when it is embedded
|
||||||
// in a control that is not itself the content view for a TLW.
|
// in a control that is not itself the content view for a TLW.
|
||||||
|
|
||||||
wxWindow* parent = GetParent();
|
wxWindow* parent = GetParent();
|
||||||
bool isParentTopLevel = true;
|
bool isParentTopLevel = true;
|
||||||
if (!parent->IsTopLevel())
|
if (!parent->IsTopLevel())
|
||||||
isParentTopLevel = false;
|
isParentTopLevel = false;
|
||||||
|
|
||||||
int x = GetPosition().x;
|
int x = GetPosition().x;
|
||||||
// we must take into account the title bar size as well, which is 26 pixels
|
// we must take into account the title bar size as well, which is 26 pixels
|
||||||
int y = GetPosition().y + 26;
|
int y = GetPosition().y + 26;
|
||||||
|
|
||||||
NSRect bounds = [m_webView frame];
|
NSRect bounds = [m_webView frame];
|
||||||
wxWindow* tlw = NULL;
|
wxWindow* tlw = NULL;
|
||||||
|
|
||||||
while(parent != NULL)
|
while(parent != NULL)
|
||||||
{
|
{
|
||||||
if (parent->IsTopLevel())
|
if (parent->IsTopLevel())
|
||||||
@@ -278,19 +278,19 @@ void wxWebKitCtrl::OnSize(wxSizeEvent &event){
|
|||||||
|
|
||||||
x += parent->GetPosition().x;
|
x += parent->GetPosition().x;
|
||||||
y += parent->GetPosition().y;
|
y += parent->GetPosition().y;
|
||||||
|
|
||||||
if ( parent->IsKindOf( CLASSINFO( wxNotebook ) ) ){
|
if ( parent->IsKindOf( CLASSINFO( wxNotebook ) ) ){
|
||||||
//manually account for the size the tabs take up
|
//manually account for the size the tabs take up
|
||||||
y += 14;
|
y += 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if ( parent->GetClassInfo()->GetClassName() == wxT("wxSplitterWindow") ){
|
//if ( parent->GetClassInfo()->GetClassName() == wxT("wxSplitterWindow") ){
|
||||||
// x += 3;
|
// x += 3;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
parent = parent->GetParent();
|
parent = parent->GetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isParentTopLevel){
|
if (!isParentTopLevel){
|
||||||
if (tlw){
|
if (tlw){
|
||||||
//x = tlw->GetSize().x - (GetSize().x + x);
|
//x = tlw->GetSize().x - (GetSize().x + x);
|
||||||
@@ -303,7 +303,7 @@ void wxWebKitCtrl::OnSize(wxSizeEvent &event){
|
|||||||
//printf("Added to bounds x=%d, y=%d\n", x, y);
|
//printf("Added to bounds x=%d, y=%d\n", x, y);
|
||||||
[m_webView setFrame:bounds];
|
[m_webView setFrame:bounds];
|
||||||
}
|
}
|
||||||
|
|
||||||
//printf("Carbon position x=%d, y=%d\n", GetPosition().x, GetPosition().y);
|
//printf("Carbon position x=%d, y=%d\n", GetPosition().x, GetPosition().y);
|
||||||
if (IsShown())
|
if (IsShown())
|
||||||
[m_webView display];
|
[m_webView display];
|
||||||
@@ -314,7 +314,7 @@ void wxWebKitCtrl::MacVisibilityChanged(){
|
|||||||
bool isHidden = !IsControlVisible( m_peer->GetControlRef());
|
bool isHidden = !IsControlVisible( m_peer->GetControlRef());
|
||||||
if (!isHidden)
|
if (!isHidden)
|
||||||
[m_webView display];
|
[m_webView display];
|
||||||
|
|
||||||
[m_webView setHidden:isHidden];
|
[m_webView setHidden:isHidden];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -193,7 +193,7 @@ void wxHtmlWinParser::InitParser(const wxString& source)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
m_UseLink = false;
|
m_UseLink = false;
|
||||||
m_Link = wxHtmlLinkInfo( wxT(""), wxT("") );
|
m_Link = wxHtmlLinkInfo( wxEmptyString );
|
||||||
m_LinkColor.Set(0, 0, 0xFF);
|
m_LinkColor.Set(0, 0, 0xFF);
|
||||||
m_ActualColor.Set(0, 0, 0);
|
m_ActualColor.Set(0, 0, 0);
|
||||||
m_Align = wxHTML_ALIGN_LEFT;
|
m_Align = wxHTML_ALIGN_LEFT;
|
||||||
|
Reference in New Issue
Block a user