Patch level : 10.0

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :
Spostata voce di scelta ditta sotto lo stesso menu della scelta studio


git-svn-id: svn://10.65.10.50/trunk@20288 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2010-03-29 14:39:36 +00:00
parent 394190ef93
commit 9d9bc446eb
5 changed files with 81 additions and 29 deletions

@ -117,7 +117,6 @@ void xvt_app_create(int WXUNUSED(argc), char** WXUNUSED(argv), unsigned long WXU
long style = wxDEFAULT_FRAME_STYLE;
wxWindow* pParent = NULL;
bool bCanChangeFirm = true;
#ifdef __WXMSW__
HWND hwndParent = (HWND)OsWin32_FindMenuContainer();
@ -131,7 +130,6 @@ void xvt_app_create(int WXUNUSED(argc), char** WXUNUSED(argv), unsigned long WXU
style = wxSYSTEM_MENU; // Lo stile si riduce al minimo: niente cornici
if ((szWin.y - szCli.y) > 2) // Sposto la finestra in modo da coprire il menu del padre
_startup_rect.top -= xvt_vobj_get_attr(NULL_WIN, ATTR_MENU_HEIGHT);
bCanChangeFirm = false; // In ogni caso NON posso piu' cambiare ditta
}
#endif
@ -172,12 +170,6 @@ void xvt_app_create(int WXUNUSED(argc), char** WXUNUSED(argv), unsigned long WXU
wxString Title[3];
Title[0] = "&File";
Menus[0] = new wxMenu;
if (bCanChangeFirm)
{
Menus[0]->Append(M_FILE_NEW, "Scelta &Ditta...");
Menus[0]->AppendSeparator();
}
Menus[0]->Append(M_FILE_PG_SETUP, "&Impostazione Stampante...");
Menus[0]->Append(M_FILE_PRINT, "&Stampa");
Menus[0]->Append(M_FILE_PREVIEW, "&Anteprima");

@ -1496,7 +1496,27 @@ void TwxOutlookBar::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t u) con
}
}
}
dc.GradientFillLinear(rect, color1, color2, wxDOWN);
if (xvt_sys_get_oem_int("OEM", -1) == 0)
{
const wxColour color0 = ModulateColour(color2, +20);
const int delta = 2*rect.height/5;
wxRect r1 = rect, r2 = rect;
r1.height = delta;
r2.y += delta; r2.height -= delta;
dc.GradientFillLinear(r1, color0, color0, wxDOWN);
dc.GradientFillLinear(r2, color2, color1, wxDOWN);
wxPen pen1(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT));
dc.SetPen(pen1);
dc.DrawLine(rect.x, rect.y, rect.GetRight(), rect.y);
wxPen pen2(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW));
dc.SetPen(pen2);
dc.DrawLine(rect.x, rect.GetBottom(), rect.GetRight(), rect.GetBottom());
}
else
dc.GradientFillLinear(rect, color1, color2, wxDOWN);
}
void TwxOutlookBar::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const
@ -1954,7 +1974,7 @@ MENU_TAG xvt_list_popup(WINDOW parent_win, const RCT* ownrct, const MENU_ITEM* m
// ToolBar
///////////////////////////////////////////////////////////
#if wxCHECK_VERSION(8,8,3)
#if wxCHECK_VERSION(3,8,9)
#include <wx/aui/auibar.h>
#define TwxToolBarBase wxAuiToolBar
#else

@ -226,7 +226,6 @@ void TPopUpBox::OnClick(wxMouseEvent& WXUNUSED(evt))
}
}
void TPopUpBox::OnTimer(wxTimerEvent& WXUNUSED(evt))
{
if (IsShown())

@ -76,6 +76,7 @@ bool TwxPDFDC::StartDoc( const wxString& message )
const wxString strUser = wxGetUserId();
m_PDFlib->PDF_set_info(m_p, "Author", strUser);
m_PDFlib->PDF_set_info(m_p, "Creator", "Campo");
m_PDFlib->PDF_set_info(m_p, "Title", message);
}
PDF_CATCH_DL(m_PDFlib, m_p)
{
@ -137,7 +138,7 @@ void TwxPDFDC::EndPage()
{
wxCHECK_RET( m_ok, wxT("invalid PDF dc") );
if (!m_pageopen)
if (!m_ok || !m_pageopen)
return;
if (m_clipping)
@ -291,7 +292,6 @@ void TwxPDFDC::DoDrawRectangle (wxCoord x, wxCoord y, wxCoord width, wxCoord hei
{
wxLogError("%s: %s", m_PDFlib->PDF_get_apiname(m_p), m_PDFlib->PDF_get_errmsg(m_p));
}
}
void TwxPDFDC::DoDrawArc (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc)
@ -409,12 +409,6 @@ void TwxPDFDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double
if (m_pen.GetStyle() == wxTRANSPARENT && m_brush.GetStyle() == wxTRANSPARENT)
return;
if (m_pen.GetStyle () != wxTRANSPARENT)
SetPen(m_pen);
if (m_brush.GetStyle() != wxTRANSPARENT)
SetBrush(m_brush);
if (sa>=360 || sa<=-360) sa=sa-int(sa/360)*360;
if (ea>=360 || ea<=-360) ea=ea-int(ea/360)*360;
if (sa<0) sa+=360;
@ -422,9 +416,14 @@ void TwxPDFDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double
if (sa==ea)
{
DrawEllipse(x,y,w,h);
return;
DrawEllipse(x,y,w,h);
return;
}
if (m_pen.GetStyle () != wxTRANSPARENT)
SetPen(m_pen);
if (m_brush.GetStyle() != wxTRANSPARENT)
SetBrush(m_brush);
PDF_TRY_DL(m_PDFlib, m_p)
{
@ -470,11 +469,7 @@ void TwxPDFDC::DoDrawRoundedRectangle (wxCoord x, wxCoord y, wxCoord width, wxCo
if (radius < 0.0)
{
double smallest = 0.0;
if (width < height)
smallest = width;
else
smallest = height;
const double smallest = width < height ? width : height;
radius = (-radius * smallest);
}
@ -565,6 +560,52 @@ void TwxPDFDC::DoDrawSpline( wxList *points )
}
}
void TwxPDFDC::DoGradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection)
{
wxCHECK_RET( m_ok, wxT("invalid PDF dc") );
PDF_TRY_DL(m_PDFlib, m_p)
{
const double ir = initialColour.Red() / 255.0;
const double ig = initialColour.Green() / 255.0;
const double ib = initialColour.Blue() / 255.0;
const double fr = destColour.Red() / 255.0;
const double fg = destColour.Green() / 255.0;
const double fb = destColour.Blue() / 255.0;
const double x = rect.x;
const double y = rect.y;
const double w = rect.width;
const double h = rect.height;
m_PDFlib->PDF_save(m_p);
m_PDFlib->PDF_setcolor(m_p, "fill", "rgb", ir, ig, ib, 0);
m_PDFlib->PDF_moveto(m_p, x, y);
m_PDFlib->PDF_lineto(m_p, x+w, y);
m_PDFlib->PDF_lineto(m_p, x+w, y+h);
m_PDFlib->PDF_lineto(m_p, x, y+h);
m_PDFlib->PDF_closepath(m_p);
m_PDFlib->PDF_clip(m_p);
CalcBoundingBox(x ,y);
CalcBoundingBox(x+w, y+h);
double x0=x,y0=y+h/2,x1=x+w,y1=y0;
switch (nDirection)
{
case wxNORTH: x0=x+w/2; y0=y+h; x1=x0; y1 = y; break;
case wxSOUTH: x0=x+w/2; y0=y; x1=x0; y1 = y+h; break;
case wxWEST : x0=x+w; y0=y+h/2; x1=x; y1 = y0; break;
case wxEAST :
default : x0=x; y0=y+h/2; x1=x+w; y1 = y0; break;
}
const int sh = m_PDFlib->PDF_shading(m_p, "axial", x0, y0, x1, y1, fr, fg, fb, 0.0, "");
m_PDFlib->PDF_shfill(m_p, sh);
m_PDFlib->PDF_restore(m_p);
}
PDF_CATCH_DL(m_PDFlib, m_p)
{
wxLogError("%s: %s", m_PDFlib->PDF_get_apiname(m_p), m_PDFlib->PDF_get_errmsg(m_p));
}
}
//-- Images and Bitmaps --------------------------------------------------
void TwxPDFDC::DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y )

@ -41,13 +41,13 @@ public:
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoGradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection);
void DoDrawSpline(wxList *points);
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = FALSE,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
bool CanDrawBitmap() const { return TRUE; }
bool CanDrawBitmap() const { return true; }
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask=FALSE );
@ -77,7 +77,7 @@ public:
wxCoord GetCharHeight() const;
wxCoord GetCharWidth() const;
bool CanGetTextExtent() const { return TRUE; }
bool CanGetTextExtent() const { return true; }
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,