コード例 #1
0
int PCBNEW_CONTROL::SwitchCursor( const TOOL_EVENT& aEvent )
{
    const unsigned int BIG_CURSOR = 4000;
    const unsigned int SMALL_CURSOR = 80;

    KIGFX::GAL* gal = getEditFrame<PCB_BASE_FRAME>()->GetGalCanvas()->GetGAL();

    if( gal->GetCursorSize() == BIG_CURSOR )
        gal->SetCursorSize( SMALL_CURSOR );
    else
        gal->SetCursorSize( BIG_CURSOR );

    return 0;
}
コード例 #2
0
void PCB_EDIT_FRAME::SetCursorShape( int aCursorShape )
{
    const unsigned int BIG_CURSOR = 8000;
    const unsigned int SMALL_CURSOR = 80;

    EDA_DRAW_FRAME::SetCursorShape( aCursorShape );
    KIGFX::GAL* gal = GetGalCanvas()->GetGAL();

    if( gal )
        gal->SetCursorSize( aCursorShape ? BIG_CURSOR : SMALL_CURSOR );
}
コード例 #3
0
int PCBNEW_CONTROL::SwitchCursor( const TOOL_EVENT& aEvent )
{
    const unsigned int BIG_CURSOR = 8000;
    const unsigned int SMALL_CURSOR = 80;

    PCB_BASE_FRAME* frame = getEditFrame<PCB_BASE_FRAME>();
    KIGFX::GAL* gal = frame->GetGalCanvas()->GetGAL();
    gal->SetCursorSize( frame->GetCursorShape() ? BIG_CURSOR : SMALL_CURSOR );

    return 0;
}