summaryrefslogtreecommitdiff
path: root/framework/source/uielement/panelwindow.cxx
blob: c8729dbb028d55023913f4f09ff972ec3a0b48a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_framework.hxx"

//_________________________________________________________________________________________________________________
//  my own includes
//_________________________________________________________________________________________________________________

#include <uielement/panelwindow.hxx>

namespace framework
{

PanelWindow::PanelWindow( Window* pParent, WinBits nWinBits ) :
    DockingWindow( pParent, nWinBits )
{
}

PanelWindow::~PanelWindow()
{
}

const ::rtl::OUString& PanelWindow::getResourceURL() const
{
    return m_aResourceURL;
}

void PanelWindow::setResourceURL(const ::rtl::OUString& rResourceURL)
{
    m_aResourceURL = rResourceURL;
}

Window* PanelWindow::getContentWindow() const
{
    return m_pContentWindow;
}

void PanelWindow::setContentWindow( Window* pContentWindow )
{
    m_pContentWindow = pContentWindow;
    if ( m_pContentWindow != NULL )
    {
        m_pContentWindow->SetParent(this);
        m_pContentWindow->SetSizePixel( GetOutputSizePixel() );
        m_pContentWindow->Show();
    }
}

void PanelWindow::Command( const CommandEvent& rCEvt )
{
    if ( m_aCommandHandler.IsSet() )
        m_aCommandHandler.Call( (void *)( &rCEvt ));
    DockingWindow::Command( rCEvt );
}

void PanelWindow::StateChanged( StateChangedType nType )
{
    DockingWindow::StateChanged( nType );
    if ( m_aStateChangedHandler.IsSet() )
        m_aStateChangedHandler.Call( &nType );
}

void PanelWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
    DockingWindow::DataChanged( rDCEvt );
    if ( m_aDataChangedHandler.IsSet() )
        m_aDataChangedHandler.Call( (void*)&rDCEvt );
}

void PanelWindow::Resize()
{
    DockingWindow::Resize();
    if ( m_pContentWindow )
        m_pContentWindow->SetSizePixel( GetOutputSizePixel() );
}

}