Exemplo n.º 1
0
void wxsSizerParentQP::SaveData()
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    m_Extra->Flags = 0;
    if ( BrdLeft  ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderLeft;
    if ( BrdRight ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderRight;
    if ( BrdTop   ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderTop;
    if ( BrdBottom->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderBottom;
    m_Extra->Border.Value       = BrdSize->GetValue();
    m_Extra->Border.DialogUnits = BrdDlg->GetValue();

    if ( PlaceExp ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::Expand;
    if ( PlaceShp ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::Shaped;

    if ( PlaceLT->GetValue() || PlaceCT->GetValue() || PlaceRT->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignTop;
    if ( PlaceLC->GetValue() || PlaceCC->GetValue() || PlaceRC->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignCenterVertical;
    if ( PlaceLB->GetValue() || PlaceCB->GetValue() || PlaceRB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignBottom;
    if ( PlaceLT->GetValue() || PlaceLC->GetValue() || PlaceLB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignLeft;
    if ( PlaceCT->GetValue() || PlaceCC->GetValue() || PlaceCB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignCenterHorizontal;
    if ( PlaceRT->GetValue() || PlaceRC->GetValue() || PlaceRB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignRight;

    m_Extra->Proportion         = Proportion->GetValue();

    NotifyChange();
}
Exemplo n.º 2
0
 void SaveData()
 {
     if ( !GetPropertyContainer() || !m_Extra ) return;
     m_Extra->m_Label = Label->GetValue();
     m_Extra->m_Selected = Selected->GetValue();
     NotifyChange();
 }
Exemplo n.º 3
0
void wxsAuiManagerParentQP::OnDockChange(wxCommandEvent& event)
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    m_Extra->m_Docked    = Docked->GetValue();
    m_Extra->m_DockFixed = DockFixed->GetValue();

    NotifyChange();
}
Exemplo n.º 4
0
void wxsAuiManagerParentQP::OnDockSiteChange(wxSpinEvent& event)
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    m_Extra->m_Layer    = Layer->GetValue();
    m_Extra->m_Row      = Row->GetValue();
    m_Extra->m_Position = Position->GetValue();

    NotifyChange();
}
Exemplo n.º 5
0
void wxsAuiManagerParentQP::OnDockDirectionChange(wxCommandEvent& event)
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    if ( DockTop->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_TOP) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_TOP;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::TopDockable;
        DockBottom->SetValue(false);
        DockLeft->  SetValue(false);
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }
    else if ( DockBottom->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_BOTTOM) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_BOTTOM;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::BottomDockable;
        DockLeft->  SetValue(false);
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }
    else if ( DockLeft->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_LEFT) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_LEFT;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::LeftDockable;
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }
    else if ( DockRight->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_RIGHT) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_RIGHT;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::RightDockable;
        DockCenter->SetValue(false);
    }
    else if ( DockCenter->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_CENTER) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_CENTER;
        m_Extra->m_DockableFlags = wxsAuiDockableProperty::Dockable;
    }
    else
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_LEFT;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::LeftDockable;
        m_Extra->m_Docked        = false;

        Docked->    SetValue(false);
        DockTop->   SetValue(false);
        DockBottom->SetValue(false);
        DockLeft->  SetValue(true);
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }

    NotifyChange();
}
Exemplo n.º 6
0
void wxsSizerParentQP::ReadData()
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    m_ParentOrientation = m_Extra->Flags & (wxsSizerFlagsProperty::ParentAlignHorizontal|wxsSizerFlagsProperty::ParentAlignVertical);

    BrdLeft   ->SetValue((m_Extra->Flags & wxsSizerFlagsProperty::BorderLeft)   != 0 );
    BrdRight  ->SetValue((m_Extra->Flags & wxsSizerFlagsProperty::BorderRight)  != 0 );
    BrdTop    ->SetValue((m_Extra->Flags & wxsSizerFlagsProperty::BorderTop)    != 0 );
    BrdBottom ->SetValue((m_Extra->Flags & wxsSizerFlagsProperty::BorderBottom) != 0 );
    BrdAll    ->SetValue(   (m_Extra->Flags & wxsSizerFlagsProperty::BorderAll) != 0
                         || (   BrdLeft->IsChecked() && BrdRight->IsChecked()
                             && BrdTop->IsChecked()  && BrdBottom->IsChecked()) );
    BrdSize   ->SetValue(m_Extra->Border.Value);
    BrdDlg    ->SetValue(m_Extra->Border.DialogUnits);

    PlaceExp  ->SetValue((m_Extra->Flags & wxsSizerFlagsProperty::Expand) != 0);
    PlaceShp  ->SetValue((m_Extra->Flags & wxsSizerFlagsProperty::Shaped) != 0);

    Proportion->SetValue(m_Extra->Proportion);

    if (PlaceExp->GetValue())
    {
        PlaceLT->Disable();
        PlaceLC->Disable();
        PlaceLB->Disable();
        PlaceCT->Disable();
        PlaceCC->Disable();
        PlaceCB->Disable();
        PlaceRT->Disable();
        PlaceRC->Disable();
        PlaceRB->Disable();
    }

    if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignBottom )
    {
        if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignRight )            PlaceRB->SetValue(true); else
        if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignCenterHorizontal ) PlaceCB->SetValue(true); else
                                                                           PlaceLB->SetValue(true);
    }
    else if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignCenterVertical )
    {
        if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignRight )            PlaceRC->SetValue(true); else
        if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignCenterHorizontal ) PlaceCC->SetValue(true); else
                                                                           PlaceLC->SetValue(true);
    }
    else
    {
        if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignRight )            PlaceRT->SetValue(true); else
        if ( m_Extra->Flags & wxsSizerFlagsProperty::AlignCenterHorizontal ) PlaceCT->SetValue(true); else
                                                                           PlaceLT->SetValue(true);
    }
}
Exemplo n.º 7
0
void wxsAuiManagerParentQP::ReadData()
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    //{General
    Name->          SetValue( m_Extra->m_Name );
    Visible->       SetValue( m_Extra->m_Visible );
    Resizable->     SetValue( m_Extra->m_Resizable );
    PaneBorder->    SetValue( m_Extra->m_PaneBorder );
    Movable->       SetValue( m_Extra->m_Movable );
    Floatable->     SetValue( m_Extra->m_Floatable );
    DestroyOnClose->SetValue( m_Extra->m_DestroyOnClose );
    //}General

    //Standard pane type
    StandardPane->SetSelection( m_Extra->m_StandardPane );

    //{Caption
    CaptionVisible->SetValue( m_Extra->m_CaptionVisible );
    Caption->       SetValue( m_Extra->m_Caption );
    MinimizeButton->SetValue( m_Extra->m_MinimizeButton );
    MaximizeButton->SetValue( m_Extra->m_MaximizeButton );
    PinButton->     SetValue( m_Extra->m_PinButton );
    CloseButton->   SetValue( m_Extra->m_CloseButton );
    //}Caption

    //Gripper
    switch ( m_Extra->m_Gripper )
    {
        case 0:
            Gripper->SetSelection(0);
            break;

        case wxLEFT:
            Gripper->SetSelection(1);
            break;

        case wxTOP:
            Gripper->SetSelection(2);
    }

    //{Dock
    Docked->   SetValue( m_Extra->m_Docked );
    DockFixed->SetValue( m_Extra->m_DockFixed );

    Layer->   SetValue( wxString::Format(_T("%d"),m_Extra->m_Layer) );
    Row->     SetValue( wxString::Format(_T("%d"),m_Extra->m_Row) );
    Position->SetValue( wxString::Format(_T("%d"),m_Extra->m_Position) );

    switch ( m_Extra->m_DockDirection )
    {
        case wxAUI_DOCK_TOP:
            DockTop->   SetValue(true);
            DockBottom->SetValue(false);
            DockLeft->  SetValue(false);
            DockRight-> SetValue(false);
            DockCenter->SetValue(false);
            break;

        case wxAUI_DOCK_BOTTOM:
            DockTop->   SetValue(false);
            DockBottom->SetValue(true);
            DockLeft->  SetValue(false);
            DockRight-> SetValue(false);
            DockCenter->SetValue(false);
            break;

        case wxAUI_DOCK_RIGHT:
            DockTop->   SetValue(false);
            DockBottom->SetValue(false);
            DockLeft->  SetValue(false);
            DockRight-> SetValue(true);
            DockCenter->SetValue(false);
            break;

        case wxAUI_DOCK_CENTER:
            DockTop->   SetValue(false);
            DockBottom->SetValue(false);
            DockLeft->  SetValue(false);
            DockRight-> SetValue(false);
            DockCenter->SetValue(true);
            break;

        case wxAUI_DOCK_LEFT:
        default:
            DockTop->   SetValue(false);
            DockBottom->SetValue(false);
            DockLeft->  SetValue(true);
            DockRight-> SetValue(false);
            DockCenter->SetValue(false);
    }

    long Dockable = m_Extra->m_DockableFlags;

    if ( Dockable == wxsAuiDockableProperty::Dockable )
    {
        TopDockable->   SetValue(true);
        BottomDockable->SetValue(true);
        LeftDockable->  SetValue(true);
        RightDockable-> SetValue(true);
    }
    else
    {
        if ( Dockable & wxsAuiDockableProperty::TopDockable    ) TopDockable->   SetValue( true );
        if ( Dockable & wxsAuiDockableProperty::BottomDockable ) BottomDockable->SetValue( true );
        if ( Dockable & wxsAuiDockableProperty::LeftDockable   ) LeftDockable->  SetValue( true );
        if ( Dockable & wxsAuiDockableProperty::RightDockable  ) RightDockable-> SetValue( true );
    }
    //}Dock
}
Exemplo n.º 8
0
 void ReadData()
 {
     if ( !GetPropertyContainer() || !m_Extra ) return;
     Label->SetValue(m_Extra->m_Label);
     Selected->SetValue(m_Extra->m_Selected);
 }