Changeset 99

User picture

Author: poliklosio

(2010/06/06 15:39) Almost 2 years ago

CHANGES: the unit testing code has been extracted to separate folder (low_layer/PKunit) and to separate namespace (PKunit), to make it reusable in other projects; The rest of code is adjusted accordingly; the #include directives are now consistently followed by a single space;

Affected files

Updated base_layer/PKbackground_of_widget.h Download diff

9899
3
#ifndef BL_PKBACKGROUND_OF_WIDGET_H_DEFINED
3
#ifndef BL_PKBACKGROUND_OF_WIDGET_H_DEFINED
4
#define BL_PKBACKGROUND_OF_WIDGET_H_DEFINED
4
#define BL_PKBACKGROUND_OF_WIDGET_H_DEFINED
5
5
6
#include"../PKlow_layer.h"
6
#include "../PKlow_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    ///@brief this is a base class for a visual representation of the main
9
    ///@brief this is a base class for a visual representation of the main

Updated base_layer/PKbase_layer_collective.cpp Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifdef PKGUI_BUILD_COLLECTIVELY
3
#ifdef PKGUI_BUILD_COLLECTIVELY
4
#define PKGUI_IN_COLLECTIVE
4
#define PKGUI_IN_COLLECTIVE
5
#include"PKbase.cpp"
5
#include "PKbase.cpp"
6
#include"PKdecorator.cpp"
6
#include "PKdecorator.cpp"
7
#include"PKdefault_event_sorter.cpp"
7
#include "PKdefault_event_sorter.cpp"
8
#include"PKdisplayers_collection.cpp"
8
#include "PKdisplayers_collection.cpp"
9
#include"PKfocus_info.cpp"
9
#include "PKfocus_info.cpp"
10
#include"PKGUI.cpp"
10
#include "PKGUI.cpp"
11
#include"PKlayer.cpp"
11
#include "PKlayer.cpp"
12
#include"PKon_area_blitter.cpp"
12
#include "PKon_area_blitter.cpp"
13
#include"PKprototype_manager.cpp"
13
#include "PKprototype_manager.cpp"
14
#include"PKsurface_manager.cpp"
14
#include "PKsurface_manager.cpp"
15
#include"PKwidget_base.cpp"
15
#include "PKwidget_base.cpp"
16
#undef PKGUI_IN_COLLECTIVE
16
#undef PKGUI_IN_COLLECTIVE
17
#endif
17
#endif

Updated base_layer/PKevent_sorter.h Download diff

9899
3
#ifndef BL_PKEVENT_SORTER_H_DEFINED
3
#ifndef BL_PKEVENT_SORTER_H_DEFINED
4
#define BL_PKEVENT_SORTER_H_DEFINED
4
#define BL_PKEVENT_SORTER_H_DEFINED
5
5
6
#include"../PKlow_layer.h"
6
#include "../PKlow_layer.h"
7
#include "PKevent.h"
7
#include "PKevent.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated base_layer/PKlayer.cpp Download diff

9899
619
    }
619
    }
620
620
621
#ifdef PK_DEBUG
621
#ifdef PK_DEBUG
622
    test_PKlayer::test_PKlayer():PKtester()
622
    test_PKlayer::test_PKlayer():PKunit::PKtester()
623
    {
623
    {
624
624
625
    }
625
    }
...
...
689
            }
689
            }
690
            PKTESTER_IS_EQUAL(temp,10);
690
            PKTESTER_IS_EQUAL(temp,10);
691
        }
691
        }
692
        return PKtest_manager::obj.current_test_succesfull();
692
        return PKunit::PKtest_manager::obj.current_test_succesfull();
693
    }
693
    }
694
694
695
    string test_PKlayer::get_id()const
695
    string test_PKlayer::get_id()const

Updated base_layer/PKlayer.h Download diff

9899
422
422
423
423
424
#ifdef PK_DEBUG
424
#ifdef PK_DEBUG
425
    class test_PKlayer:public PKtester
425
    class test_PKlayer:public PKunit::PKtester
426
    {
426
    {
427
      public:
427
      public:
428
        test_PKlayer();
428
        test_PKlayer();

Updated base_layer/PKpoint_in_rect_checker.h Download diff

9899
3
#ifndef BL_PKPOINT_IN_RECT_CHECKER_H_DEFINED
3
#ifndef BL_PKPOINT_IN_RECT_CHECKER_H_DEFINED
4
#define BL_PKPOINT_IN_RECT_CHECKER_H_DEFINED
4
#define BL_PKPOINT_IN_RECT_CHECKER_H_DEFINED
5
5
6
#include"PKpoint_on_widget_checker.h"
6
#include "PKpoint_on_widget_checker.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    class PKpoint_in_rect_checker:public PKpoint_on_widget_checker
9
    class PKpoint_in_rect_checker:public PKpoint_on_widget_checker

Updated base_layer/PKpoint_on_widget_checker.h Download diff

9899
3
#ifndef BL_PKPOINT_ON_WIDGET_CHECKER_H_DEFINED
3
#ifndef BL_PKPOINT_ON_WIDGET_CHECKER_H_DEFINED
4
#define BL_PKPOINT_ON_WIDGET_CHECKER_H_DEFINED
4
#define BL_PKPOINT_ON_WIDGET_CHECKER_H_DEFINED
5
5
6
#include"../PKlow_layer.h"
6
#include "../PKlow_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    class PKpoint_on_widget_checker
9
    class PKpoint_on_widget_checker

Updated base_layer/PKsurface_manager.cpp Download diff

9899
660
    }
660
    }
661
#ifdef PK_DEBUG
661
#ifdef PK_DEBUG
662
    test_PKsurface_manager::test_PKsurface_manager():
662
    test_PKsurface_manager::test_PKsurface_manager():
663
        PKtester()
663
        PKunit::PKtester()
664
    {
664
    {
665
    }
665
    }
666
666
...
...
767
                PKTESTER_IS_FALSE(true);
767
                PKTESTER_IS_FALSE(true);
768
            }
768
            }
769
        }
769
        }
770
        return PKtest_manager::obj.current_test_succesfull();
770
        return PKunit::PKtest_manager::obj.current_test_succesfull();
771
    }
771
    }
772
#endif
772
#endif
773
}
773
}

Updated base_layer/PKsurface_manager.h Download diff

9899
290
    }
290
    }
291
291
292
#ifdef PK_DEBUG
292
#ifdef PK_DEBUG
293
    class test_PKsurface_manager:public PKtester
293
    class test_PKsurface_manager:public PKunit::PKtester
294
    {
294
    {
295
      public:
295
      public:
296
        test_PKsurface_manager();
296
        test_PKsurface_manager();

Updated geom_2D_lib/PKmath_2D.cpp Download diff

9899
1
#include"PKmath_2D.h"
1
#include "PKmath_2D.h"
2
#include<cmath>
2
#include <cmath>
3
#include<cassert>
3
#include <cassert>
4
#include<iostream>
4
#include <iostream>
5
5
6
namespace PKgui
6
namespace PKgui
7
{
7
{

Updated geom_2D_lib/PKmath_2D.h Download diff

9899
1
#ifndef LL_PKMATH_2D_H_DEFINED
1
#ifndef LL_PKMATH_2D_H_DEFINED
2
#define LL_PKMATH_2D_H_DEFINED
2
#define LL_PKMATH_2D_H_DEFINED
3
3
4
#include"../low_layer/PK2Dpoint.h"
4
#include "../low_layer/PK2Dpoint.h"
5
#include<utility>
5
#include <utility>
6
6
7
namespace PKgui
7
namespace PKgui
8
{
8
{

Updated high_layer/PKadvanced_positioner_component.cpp Download diff

9899
1
/* This file is under the PKgui License (see License.txt file).
1
/* This file is under the PKgui License (see License.txt file).
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
4
#include"PKadvanced_positioner_component.h"
4
#include "PKadvanced_positioner_component.h"
5
namespace PKgui
5
namespace PKgui
6
{
6
{
7
    PKpoint PKadvanced_positioner_component::position(
7
    PKpoint PKadvanced_positioner_component::position(

Updated high_layer/PKadvanced_positioner_component.h Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifndef HL_PKADVANCED_POSITIONER_COMPONENT_H_DEFINED
3
#ifndef HL_PKADVANCED_POSITIONER_COMPONENT_H_DEFINED
4
#define HL_PKADVANCED_POSITIONER_COMPONENT_H_DEFINED
4
#define HL_PKADVANCED_POSITIONER_COMPONENT_H_DEFINED
5
#include"../PKspecific_layer.h"
5
#include "../PKspecific_layer.h"
6
#include"PKsimple_positioner_component.h"
6
#include "PKsimple_positioner_component.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    struct PKrelative_positioning_format
9
    struct PKrelative_positioning_format

Updated high_layer/PKhigh_layer_collective.cpp Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifdef PKGUI_BUILD_COLLECTIVELY
3
#ifdef PKGUI_BUILD_COLLECTIVELY
4
#define PKGUI_IN_COLLECTIVE
4
#define PKGUI_IN_COLLECTIVE
5
#include"PKadvanced_positioner_component.cpp"
5
#include "PKadvanced_positioner_component.cpp"
6
#include"PKextended_widget_factory.cpp"
6
#include "PKextended_widget_factory.cpp"
7
#include"PKini_language_controller.cpp"
7
#include "PKini_language_controller.cpp"
8
#include"PKlanguage_controller.cpp"
8
#include "PKlanguage_controller.cpp"
9
#include"PKsimple_positioner_component.cpp"
9
#include "PKsimple_positioner_component.cpp"
10
#include"PKsurfaces_filenames.cpp"
10
#include "PKsurfaces_filenames.cpp"
11
#include"PKsurfaces_ids.cpp"
11
#include "PKsurfaces_ids.cpp"
12
#include"PKwidget_factory.cpp"
12
#include "PKwidget_factory.cpp"
13
#undef PKGUI_IN_COLLECTIVE
13
#undef PKGUI_IN_COLLECTIVE
14
#endif
14
#endif

Updated high_layer/PKlanguage.h Download diff

9899
3
#ifndef HL_PKLANGUAGE_H_DEFINED
3
#ifndef HL_PKLANGUAGE_H_DEFINED
4
#define HL_PKLANGUAGE_H_DEFINED
4
#define HL_PKLANGUAGE_H_DEFINED
5
5
6
#include"../PKspecific_layer.h"
6
#include "../PKspecific_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    class PKlanguage
9
    class PKlanguage

Updated high_layer/PKlanguage_controller.h Download diff

9899
3
#ifndef HL_PKLANGUAGE_CONTROLLER_H_DEFINED
3
#ifndef HL_PKLANGUAGE_CONTROLLER_H_DEFINED
4
#define HL_PKLANGUAGE_CONTROLLER_H_DEFINED
4
#define HL_PKLANGUAGE_CONTROLLER_H_DEFINED
5
5
6
#include"../PKspecific_layer.h"
6
#include "../PKspecific_layer.h"
7
#include "PKlanguage.h"
7
#include "PKlanguage.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated high_layer/PKpositioner.h Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifndef HL_PKSIMPLE_POSITIONER_H_DEFINED
3
#ifndef HL_PKSIMPLE_POSITIONER_H_DEFINED
4
#define HL_PKSIMPLE_POSITIONER_H_DEFINED
4
#define HL_PKSIMPLE_POSITIONER_H_DEFINED
5
#include"../PKspecific_layer.h"
5
#include "../PKspecific_layer.h"
6
#include"PKsimple_positioner_component.h"
6
#include "PKsimple_positioner_component.h"
7
#include"PKadvanced_positioner_component.h"
7
#include "PKadvanced_positioner_component.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{
10
    ///@brief this is a simple interface for classes used to position widgets
10
    ///@brief this is a simple interface for classes used to position widgets

Updated high_layer/PKsimple_positioner_component.cpp Download diff

9899
1
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
1
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
2
#include"PKsimple_positioner_component.h"
2
#include "PKsimple_positioner_component.h"
3
namespace PKgui
3
namespace PKgui
4
{
4
{
5
    PKsimple_positioner_component::PKsimple_positioner_component(Sint16 right_skip,
5
    PKsimple_positioner_component::PKsimple_positioner_component(Sint16 right_skip,

Updated high_layer/PKsimple_positioner_component.h Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifndef HL_PKSIMPLE_POSITIONER_COMPONENT_H_DEFINED
3
#ifndef HL_PKSIMPLE_POSITIONER_COMPONENT_H_DEFINED
4
#define HL_PKSIMPLE_POSITIONER_COMPONENT_H_DEFINED
4
#define HL_PKSIMPLE_POSITIONER_COMPONENT_H_DEFINED
5
#include"../PKspecific_layer.h"
5
#include "../PKspecific_layer.h"
6
6
7
namespace PKgui
7
namespace PKgui
8
{
8
{

Updated high_layer/PKsurfaces_filenames.h Download diff

9899
3
#ifndef LL_PKSURFACES_FILENAMES_H_DEFINED
3
#ifndef LL_PKSURFACES_FILENAMES_H_DEFINED
4
#define LL_PKSURFACES_FILENAMES_H_DEFINED
4
#define LL_PKSURFACES_FILENAMES_H_DEFINED
5
5
6
#include"../PKspecific_layer.h"
6
#include "../PKspecific_layer.h"
7
7
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated high_layer/PKsurfaces_ids.h Download diff

9899
3
#ifndef LL_PKSURFACE_IDS_H_DEFINED
3
#ifndef LL_PKSURFACE_IDS_H_DEFINED
4
#define LL_PKSURFACE_IDS_H_DEFINED
4
#define LL_PKSURFACE_IDS_H_DEFINED
5
5
6
#include"../PKspecific_layer.h"
6
#include "../PKspecific_layer.h"
7
7
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated high_layer/PKtests.h Download diff

9899
29
        void test_all()
29
        void test_all()
30
        {
30
        {
31
#ifdef PK_DEBUG
31
#ifdef PK_DEBUG
32
            PKtest_manager::obj.test_all();
32
            PKunit::PKtest_manager::obj.test_all();
33
#endif
33
#endif
34
        }
34
        }
35
    };
35
    };

Updated high_layer/PKwidget_factory.h Download diff

9899
3
#ifndef HL_WIDGET_FACTORY_H_DEFINED
3
#ifndef HL_WIDGET_FACTORY_H_DEFINED
4
#define HL_WIDGET_FACTORY_H_DEFINED
4
#define HL_WIDGET_FACTORY_H_DEFINED
5
5
6
#include"../PKspecific_layer.h"
6
#include "../PKspecific_layer.h"
7
7
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated includes.h Download diff

9899
7
#include <GL/glu.h>
7
#include <GL/glu.h>
8
#include <GL/glext.h>
8
#include <GL/glext.h>
9
#include <iostream>
9
#include <iostream>
10
//#include"PKlow_layer.h"
10
//#include "PKlow_layer.h"
11
//#include"PKbase_layer.h"
11
//#include "PKbase_layer.h"
12
//#include "PKspecific_layer.h"
12
//#include "PKspecific_layer.h"
13
#include "PKgui.h"
13
#include "PKgui.h"
14
using namespace std;
14
using namespace std;

Updated low_layer/PKbasic_graphical.cpp Download diff

9899
1346
                true));
1346
                true));
1347
            PKTESTER_IS_EQUAL(target.size(),0u);
1347
            PKTESTER_IS_EQUAL(target.size(),0u);
1348
        }
1348
        }
1349
        return PKtest_manager::obj.current_test_succesfull();
1349
        return PKunit::PKtest_manager::obj.current_test_succesfull();
1350
    }
1350
    }
1351
#endif
1351
#endif
1352
}
1352
}

Updated low_layer/PKbasic_graphical.h Download diff

9899
463
    void delete_copied_palette(SDL_Palette** _pal);
463
    void delete_copied_palette(SDL_Palette** _pal);
464
464
465
#ifdef PK_DEBUG
465
#ifdef PK_DEBUG
466
    struct test_PKbasic_graphical: public PKtester
466
    struct test_PKbasic_graphical: public PKunit::PKtester
467
    {
467
    {
468
        test_PKbasic_graphical();
468
        test_PKbasic_graphical();
469
        string get_id()const;
469
        string get_id()const;

Updated low_layer/PKbitmap_font.cpp Download diff

9899
1198
                PKTESTER_IS_EQUAL(r2,(int)s[i]+1);
1198
                PKTESTER_IS_EQUAL(r2,(int)s[i]+1);
1199
            }
1199
            }
1200
        }
1200
        }
1201
        return PKtest_manager::obj.current_test_succesfull();
1201
        return PKunit::PKtest_manager::obj.current_test_succesfull();
1202
    }
1202
    }
1203
#endif
1203
#endif
1204
}
1204
}

Updated low_layer/PKbitmap_font.h Download diff

9899
476
    inline int PKbitmap_font::get_code_count()const
476
    inline int PKbitmap_font::get_code_count()const
477
        {return characters.size();}
477
        {return characters.size();}
478
#ifdef PK_DEBUG
478
#ifdef PK_DEBUG
479
    struct test_PKbitmap_font: public PKtester
479
    struct test_PKbitmap_font: public PKunit::PKtester
480
    {
480
    {
481
        test_PKbitmap_font();
481
        test_PKbitmap_font();
482
        string get_id()const;
482
        string get_id()const;

Updated low_layer/PKdraw.cpp Download diff

9899
1561
            PKTESTER_IS_TRUE( PKdraw::get_pixel(sfc,31,19)==cbcg);
1561
            PKTESTER_IS_TRUE( PKdraw::get_pixel(sfc,31,19)==cbcg);
1562
            PKTESTER_IS_TRUE( PKdraw::get_pixel(sfc,22,21)==cbcg);
1562
            PKTESTER_IS_TRUE( PKdraw::get_pixel(sfc,22,21)==cbcg);
1563
        }
1563
        }
1564
1564
        return PKunit::PKtest_manager::obj.current_test_succesfull();
1565
1566
        return PKtest_manager::obj.current_test_succesfull();
1567
    }
1565
    }
1568
#endif
1566
#endif
1569
}
1567
}

Updated low_layer/PKdraw.h Download diff

9899
6
#include "PKlib_includes.h"
6
#include "PKlib_includes.h"
7
#include "PKpoint.h"
7
#include "PKpoint.h"
8
#include "PKglobal_f.h"
8
#include "PKglobal_f.h"
9
#include "PKtester.h"
9
#include "PKunit.h"
10
10
11
namespace PKgui
11
namespace PKgui
12
{
12
{
...
...
416
            int _xint,int _yint,float _x,SDL_Color _pixel);
416
            int _xint,int _yint,float _x,SDL_Color _pixel);
417
    };
417
    };
418
#ifdef PK_DEBUG
418
#ifdef PK_DEBUG
419
    struct test_PKdraw: public PKtester
419
    struct test_PKdraw: public PKunit::PKtester
420
    {
420
    {
421
        test_PKdraw();
421
        test_PKdraw();
422
        string get_id()const;
422
        string get_id()const;

Updated low_layer/PKfilled_shape_drawer.h Download diff

9899
4
#ifndef PKFILLED_SHAPE_DRAWER_H_
4
#ifndef PKFILLED_SHAPE_DRAWER_H_
5
#define PKFILLED_SHAPE_DRAWER_H_
5
#define PKFILLED_SHAPE_DRAWER_H_
6
6
7
#include"PKsurface.h"
7
#include "PKsurface.h"
8
#include"PKlib_includes.h"
8
#include "PKlib_includes.h"
9
#include"PKpoint.h"
9
#include "PKpoint.h"
10
10
11
namespace PKgui
11
namespace PKgui
12
{
12
{

Updated low_layer/PKgraphics_provider_opengl.cpp Download diff

9899
5
#include "PKgraphical_data.h"
5
#include "PKgraphical_data.h"
6
#include "../geom_2D_lib/PKline_in_rect_sketcher.h"
6
#include "../geom_2D_lib/PKline_in_rect_sketcher.h"
7
#include "PKopengl_texture.h"
7
#include "PKopengl_texture.h"
8
//#include"PKbasic_graphical.h.h"
9
8
10
namespace PKgui
9
namespace PKgui
11
{
10
{

Updated low_layer/PKinilib/PKinilib.h Download diff

9899
3
#ifndef PKINILIB_H_DEFINED
3
#ifndef PKINILIB_H_DEFINED
4
#define PKINILIB_H_DEFINED
4
#define PKINILIB_H_DEFINED
5
5
6
#include<string>
7
#include<cctype>
8
#include<map>
9
#include<iostream>
10
#include<fstream>
11
#include<list>
12
#include "PKinilib_private.h"
6
#include "PKinilib_private.h"
13
7
14
///this namespace contains a small library which handles reading and writing
8
///this namespace contains a small library which handles reading and writing

Updated low_layer/PKinilib/PKinilib_private.h Download diff

9899
3
#ifndef PKINILIB_PRIVATE_H_DEFINED
3
#ifndef PKINILIB_PRIVATE_H_DEFINED
4
#define PKINILIB_PRIVATE_H_DEFINED
4
#define PKINILIB_PRIVATE_H_DEFINED
5
5
6
#include<string>
6
#include <string>
7
#include<cctype>
7
#include <cctype>
8
#include<map>
8
#include <map>
9
#include<iostream>
9
#include <iostream>
10
#include<fstream>
10
#include <fstream>
11
#include<list>
11
#include <list>
12
namespace PKinilib
12
namespace PKinilib
13
{
13
{
14
    template<class file_format>
14
    template<class file_format>

Updated low_layer/PKlow_layer_collective.cpp Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifdef PKGUI_BUILD_COLLECTIVELY
3
#ifdef PKGUI_BUILD_COLLECTIVELY
4
#define PKGUI_IN_COLLECTIVE
4
#define PKGUI_IN_COLLECTIVE
5
#include"PKbasic_graphical.cpp"
5
#include "PKbasic_graphical.cpp"
6
#include"PKbitmap_font.cpp"
6
#include "PKbitmap_font.cpp"
7
#include"PKblitting_strategy.cpp"
7
#include "PKblitting_strategy.cpp"
8
#include"PKchar_format_conv.cpp"
8
#include "PKchar_format_conv.cpp"
9
#include"PKchar_glyph_chooser.cpp"
9
#include "PKchar_glyph_chooser.cpp"
10
#include"PKconstants.cpp"
10
#include "PKconstants.cpp"
11
#include"PKdisplay_target.cpp"
11
#include "PKdisplay_target.cpp"
12
#include"PKdisplay.cpp"
12
#include "PKdisplay.cpp"
13
#include"PKdraw.cpp"
13
#include "PKdraw.cpp"
14
#include"PKfilled_shape_drawer.cpp"
14
#include "PKfilled_shape_drawer.cpp"
15
#include"PKfont.cpp"
15
#include "PKfont.cpp"
16
#include"PKframe_surfaces.cpp"
16
#include "PKframe_surfaces.cpp"
17
#include"PKglobal_f.cpp"
17
#include "PKglobal_f.cpp"
18
#include"PKgraphical_data.cpp"
18
#include "PKgraphical_data.cpp"
19
#include"PKgraphics_provider_opengl.cpp"
19
#include "PKgraphics_provider_opengl.cpp"
20
#include"PKgraphics_provider_sdl.cpp"
20
#include "PKgraphics_provider_sdl.cpp"
21
#include"PKgraphics_provider.cpp"
21
#include "PKgraphics_provider.cpp"
22
#include"PKimage_loader.cpp"
22
#include "PKimage_loader.cpp"
23
#include"PKimage_pieces.cpp"
23
#include "PKimage_pieces.cpp"
24
#include"PKin_grid_direction.cpp"
24
#include "PKin_grid_direction.cpp"
25
#include"PKini_file_format_UNICODELE.cpp"
25
#include "PKini_file_format_UNICODELE.cpp"
26
#include"PKlog.cpp"
26
#include "PKlog.cpp"
27
#include"PKpart_and_pos_for_internal.cpp"
27
#include "PKpart_and_pos_for_internal.cpp"
28
#include"PKprogress_bar.cpp"
28
#include "PKprogress_bar.cpp"
29
#include"PKrects_for_drawing.cpp"
29
#include "PKrects_for_drawing.cpp"
30
#include"PKref_counts.cpp"
30
#include "PKref_counts.cpp"
31
#include"PKreversed_set.cpp"
31
#include "PKreversed_set.cpp"
32
#include"PKsmart_ptr.cpp"
32
#include "PKsmart_ptr.cpp"
33
#include"PKstring.cpp"
33
#include "PKstring.cpp"
34
#include"PKsurface.cpp"
34
#include "PKsurface.cpp"
35
#include"PKtable_data.cpp"
35
#include "PKtable_data.cpp"
36
#include"PKtester.cpp"
36
#include "PKtext_align.cpp"
37
#include"PKtext_align.cpp"
37
#include "PKtext_displayer_per_char.cpp"
38
#include"PKtext_displayer_per_char.cpp"
38
#include "PKtext_displayer_per_line.cpp"
39
#include"PKtext_displayer_per_line.cpp"
39
#include "PKtext_renderer.cpp"
40
#include"PKtext_renderer.cpp"
40
#include "PKtext.cpp"
41
#include"PKtext.cpp"
41
#include "PKtexture_unit.cpp"
42
#include"PKtexture_unit.cpp"
42
#include "PKttf_font.cpp"
43
#include"PKttf_font.cpp"
43
#include "PKunclipping_values.cpp"
44
#include"PKunclipping_values.cpp"
45
#undef PKGUI_IN_COLLECTIVE
44
#undef PKGUI_IN_COLLECTIVE
46
#endif
45
#endif

Updated low_layer/PKreversed_set.cpp Download diff

9899
111
            PKreversed_set<int>::iterator i=rsi.insert(++(rsi.begin()),1000);
111
            PKreversed_set<int>::iterator i=rsi.insert(++(rsi.begin()),1000);
112
            PKTESTER_IS_EQUAL(*(i),1000);
112
            PKTESTER_IS_EQUAL(*(i),1000);
113
        }
113
        }
114
        return PKtest_manager::obj.current_test_succesfull();
114
        return PKunit::PKtest_manager::obj.current_test_succesfull();
115
    }
115
    }
116
#endif
116
#endif
117
}
117
}

Updated low_layer/PKreversed_set.h Download diff

9899
4
#define LL_PKREVERSED_SET_H_DEFINED
4
#define LL_PKREVERSED_SET_H_DEFINED
5
5
6
#include "PKlib_includes.h"
6
#include "PKlib_includes.h"
7
#include "PKtester.h"
7
#include "PKunit.h"
8
8
9
namespace PKgui
9
namespace PKgui
10
{
10
{
...
...
173
        bool created_using_new;
173
        bool created_using_new;
174
    };
174
    };
175
#ifdef PK_DEBUG
175
#ifdef PK_DEBUG
176
    struct test_PKreversed_set: public PKtester
176
    struct test_PKreversed_set: public PKunit::PKtester
177
    {
177
    {
178
        test_PKreversed_set();
178
        test_PKreversed_set();
179
        string get_id()const;
179
        string get_id()const;

Updated low_layer/PKsmart_ptr.cpp Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
4
#include "PKsmart_ptr.h"
4
#include "PKsmart_ptr.h"
5
#include "PKtester.h"
5
#include "PKunit.h"
6
6
7
namespace PKgui
7
namespace PKgui
8
{
8
{
...
...
81
            }
81
            }
82
            PKTESTER_IS_EQUAL(test_integer,33);
82
            PKTESTER_IS_EQUAL(test_integer,33);
83
        }
83
        }
84
        return PKtest_manager::obj.current_test_succesfull();
84
        return PKunit::PKtest_manager::obj.current_test_succesfull();
85
    }
85
    }
86
#endif
86
#endif
87
}
87
}

Updated low_layer/PKsmart_ptr.h Download diff

9899
7
#include "PKlib_includes.h"
7
#include "PKlib_includes.h"
8
#include "PKref_counts.h"
8
#include "PKref_counts.h"
9
#include "PKsmart_ptr_policies.h"
9
#include "PKsmart_ptr_policies.h"
10
#include "PKtester.h"
10
#include "PKunit.h"
11
11
12
namespace PKgui
12
namespace PKgui
13
{
13
{
...
...
404
            Instance().get_number_of_refs(ptr.in);
404
            Instance().get_number_of_refs(ptr.in);
405
    }
405
    }
406
#ifdef PK_DEBUG
406
#ifdef PK_DEBUG
407
    struct test_PKsmart_ptr: public PKtester
407
    struct test_PKsmart_ptr: public PKunit::PKtester
408
    {
408
    {
409
        test_PKsmart_ptr();
409
        test_PKsmart_ptr();
410
        string get_id()const;
410
        string get_id()const;

Updated low_layer/PKstring.cpp Download diff

9899
104
    //test_PKstring test_PKstring::_obj;
104
    //test_PKstring test_PKstring::_obj;
105
    string test_PKstring::get_id()const{return "test_PKstring";}
105
    string test_PKstring::get_id()const{return "test_PKstring";}
106
106
107
    test_PKstring::test_PKstring():PKtester()
107
    test_PKstring::test_PKstring():PKunit::PKtester()
108
    {
108
    {
109
    }
109
    }
110
110
...
...
173
        cmpsv.push_back("ss");
173
        cmpsv.push_back("ss");
174
        cmpsv.push_back("");
174
        cmpsv.push_back("");
175
        PKTESTER_IS_TRUE(cmpsv==to);//,"error in insert");
175
        PKTESTER_IS_TRUE(cmpsv==to);//,"error in insert");
176
        return PKtest_manager::obj.current_test_succesfull();
176
        return PKunit::PKtest_manager::obj.current_test_succesfull();
177
    }
177
    }
178
#endif
178
#endif
179
}
179
}

Updated low_layer/PKstring.h Download diff

9899
4
#define LL_PKSTRING_H_DEFINED
4
#define LL_PKSTRING_H_DEFINED
5
5
6
#include "PKlib_includes.h"
6
#include "PKlib_includes.h"
7
#include "PKtester.h"
7
#include "PKunit.h"
8
8
9
namespace PKgui
9
namespace PKgui
10
{
10
{
...
...
953
    }
953
    }
954
954
955
#ifdef PK_DEBUG
955
#ifdef PK_DEBUG
956
    struct test_PKstring: public PKtester
956
    struct test_PKstring: public PKunit::PKtester
957
    {
957
    {
958
        test_PKstring();
958
        test_PKstring();
959
        string get_id()const;
959
        string get_id()const;

Updated low_layer/PKtext.cpp Download diff

9899
1
/* This file is under the PKgui License (see License.txt file).
1
/* This file is under the PKgui License (see License.txt file).
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
4
//#include"PKtext.h"
4
//#include "PKtext.h"
5
//#include"PKbitmap_font.h"
5
//#include "PKbitmap_font.h"
6
//namespace PKgui
6
//namespace PKgui
7
//{
7
//{
8
//#ifdef PK_DEBUG
8
//#ifdef PK_DEBUG

Updated low_layer/PKtext_displayer_per_char.cpp Download diff

9899
159
                }
159
                }
160
            }
160
            }
161
        }
161
        }
162
        return PKtest_manager::obj.current_test_succesfull();
162
        return PKunit::PKtest_manager::obj.current_test_succesfull();
163
    }
163
    }
164
#endif
164
#endif
165
}
165
}

Updated low_layer/PKtext_displayer_per_char.h Download diff

9899
505
        return new PKtext_displayer_per_char<textType>(_string_vec,_attr);
505
        return new PKtext_displayer_per_char<textType>(_string_vec,_attr);
506
    }
506
    }
507
#ifdef PK_DEBUG
507
#ifdef PK_DEBUG
508
    struct test_PKtext_displayer_per_char: public PKtester
508
    struct test_PKtext_displayer_per_char: public PKunit::PKtester
509
    {
509
    {
510
        test_PKtext_displayer_per_char();
510
        test_PKtext_displayer_per_char();
511
        string get_id()const;
511
        string get_id()const;

Updated low_layer/PKtext_displayer_per_line.cpp Download diff

9899
314
            }
314
            }
315
        }
315
        }
316
//        TTF_CloseFont(font);
316
//        TTF_CloseFont(font);
317
        return PKtest_manager::obj.current_test_succesfull();
317
        return PKunit::PKtest_manager::obj.current_test_succesfull();
318
    }
318
    }
319
#endif
319
#endif
320
}
320
}

Updated low_layer/PKtext_displayer_per_line.h Download diff

9899
575
        return result;
575
        return result;
576
    }
576
    }
577
#ifdef PK_DEBUG
577
#ifdef PK_DEBUG
578
    struct test_PKtext_displayer_per_line: public PKtester
578
    struct test_PKtext_displayer_per_line: public PKunit::PKtester
579
    {
579
    {
580
        test_PKtext_displayer_per_line();
580
        test_PKtext_displayer_per_line();
581
        string get_id()const;
581
        string get_id()const;

Added low_layer/PKunit/PKtester.cpp

Show contents

Added low_layer/PKunit/PKtester.h

Show contents

Updated PKlow_layer.h Download diff

9899
23
#include "low_layer/PKprogress_bar.h"
23
#include "low_layer/PKprogress_bar.h"
24
#include "low_layer/PKconstants.h"
24
#include "low_layer/PKconstants.h"
25
#include "low_layer/PKstring.h"
25
#include "low_layer/PKstring.h"
26
#include "low_layer/PKtester.h"
26
#include "low_layer/PKunit.h"
27
#include "low_layer/PKtext.h"
27
#include "low_layer/PKtext.h"
28
#include "low_layer/PKini_file_format_UNICODELE.h"
28
#include "low_layer/PKini_file_format_UNICODELE.h"
29
#include "low_layer/PKtext_align.h"
29
#include "low_layer/PKtext_align.h"

Updated specific_layer/composites/PKw_box.h Download diff

9899
4
#define SL_PKWIDGET_BOX_H_DEFINED
4
#define SL_PKWIDGET_BOX_H_DEFINED
5
5
6
#include "../widgets/PKwidget.h"
6
#include "../widgets/PKwidget.h"
7
#include"../../PKbase_layer.h"
7
#include "../../PKbase_layer.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{
10
//    ///objects are put into the box after wrapping into
10
//    ///objects are put into the box after wrapping into

Updated specific_layer/composites/PKw_composite.h Download diff

9899
3
#ifndef SL_PKWIDGET_COMPOSITE_H_DEFINED
3
#ifndef SL_PKWIDGET_COMPOSITE_H_DEFINED
4
#define SL_PKWIDGET_COMPOSITE_H_DEFINED
4
#define SL_PKWIDGET_COMPOSITE_H_DEFINED
5
5
6
#include"../widget_components/PKlayer_component.h"
6
#include "../widget_components/PKlayer_component.h"
7
#include"../widgets/PKwidget.h"
7
#include "../widgets/PKwidget.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{
10
    /**
10
    /**

Updated specific_layer/composites/PKw_pull_down_menu.h Download diff

9899
3
#ifndef SL_PKWIDGET_DROP_LIST_H_DEFINED
3
#ifndef SL_PKWIDGET_DROP_LIST_H_DEFINED
4
#define SL_PKWIDGET_DROP_LIST_H_DEFINED
4
#define SL_PKWIDGET_DROP_LIST_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "../widgets/PKwidget.h"
7
#include "../widgets/PKwidget.h"
8
#include "../widgets/PKw_button.h"
8
#include "../widgets/PKw_button.h"
9
#include "../helpers/PKpull_down_menu_element.h"
9
#include "../helpers/PKpull_down_menu_element.h"

Updated specific_layer/composites/PKw_slider.h Download diff

9899
6
#include "../widgets/PKwidget.h"
6
#include "../widgets/PKwidget.h"
7
#include "PKw_composite.h"
7
#include "PKw_composite.h"
8
#include "../widgets/PKw_button.h"
8
#include "../widgets/PKw_button.h"
9
#include"../../PKbase_layer.h"
9
#include "../../PKbase_layer.h"
10
10
11
namespace PKgui
11
namespace PKgui
12
{
12
{

Updated specific_layer/composites/PKw_unpositioned_tabbed_view.cpp Download diff

9899
401
    }
401
    }
402
402
403
#ifdef PK_DEBUG
403
#ifdef PK_DEBUG
404
    test_PKw_unpositioned_tabbed_view::test_PKw_unpositioned_tabbed_view():
404
    test_PKw_unpositioned_tabbed_view::test_PKw_unpositioned_tabbed_view()
405
        PKtester()
406
    {
405
    {
407
    }
406
    }
408
407
...
...
685
            PKTESTER_IS_EQUAL(o.contains_area(get_in(o.get_area(0))).first,true);
684
            PKTESTER_IS_EQUAL(o.contains_area(get_in(o.get_area(0))).first,true);
686
            PKTESTER_IS_EQUAL(o.contains_area(get_in(o.get_area(0))).second,0u);
685
            PKTESTER_IS_EQUAL(o.contains_area(get_in(o.get_area(0))).second,0u);
687
        }
686
        }
688
        return PKtest_manager::obj.current_test_succesfull();
687
        return PKunit::PKtest_manager::obj.current_test_succesfull();
689
    }
688
    }
690
#endif
689
#endif
691
}
690
}

Updated specific_layer/composites/PKw_unpositioned_tabbed_view.h Download diff

9899
157
        {return active_tab;}
157
        {return active_tab;}
158
158
159
#ifdef PK_DEBUG
159
#ifdef PK_DEBUG
160
    class test_PKw_unpositioned_tabbed_view:public PKtester
160
    class test_PKw_unpositioned_tabbed_view:public PKunit::PKtester
161
    {
161
    {
162
      public:
162
      public:
163
        test_PKw_unpositioned_tabbed_view();
163
        test_PKw_unpositioned_tabbed_view();

Updated specific_layer/decorators/PKdecorator_frame.h Download diff

9899
3
#ifndef SL_PKDECORATOR_FRAME_H_DEFINED
3
#ifndef SL_PKDECORATOR_FRAME_H_DEFINED
4
#define SL_PKDECORATOR_FRAME_H_DEFINED
4
#define SL_PKDECORATOR_FRAME_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKdecorator_of_positioned.h"
7
#include "PKdecorator_of_positioned.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated specific_layer/decorators/PKdecorator_of_positioned.h Download diff

9899
3
#ifndef SL_PKWIDGET_DECORATOR_H_DEFINED
3
#ifndef SL_PKWIDGET_DECORATOR_H_DEFINED
4
#define SL_PKWIDGET_DECORATOR_H_DEFINED
4
#define SL_PKWIDGET_DECORATOR_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    ///@brief this is a base class of many decorators that can only decorate
9
    ///@brief this is a base class of many decorators that can only decorate

Updated specific_layer/decorators/PKdecorator_truncator.h Download diff

9899
3
#ifndef SL_PKDECORATOR_TRUNCATOR_H_DEFINED
3
#ifndef SL_PKDECORATOR_TRUNCATOR_H_DEFINED
4
#define SL_PKDECORATOR_TRUNCATOR_H_DEFINED
4
#define SL_PKDECORATOR_TRUNCATOR_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKdecorator_of_positioned.h"
7
#include "PKdecorator_of_positioned.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated specific_layer/helpers/PKanchor.h Download diff

9899
3
#ifndef SL_PKANCHOR_H_DEFINED
3
#ifndef SL_PKANCHOR_H_DEFINED
4
#define SL_PKANCHOR_H_DEFINED
4
#define SL_PKANCHOR_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    /**
9
    /**

Updated specific_layer/helpers/PKpull_down_menu_element.h Download diff

9899
3
#ifndef SL_PKDROP_LIST_ELEMENT_H_DEFINED
3
#ifndef SL_PKDROP_LIST_ELEMENT_H_DEFINED
4
#define SL_PKDROP_LIST_ELEMENT_H_DEFINED
4
#define SL_PKDROP_LIST_ELEMENT_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "../widgets/PKwidget.h"
7
#include "../widgets/PKwidget.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated specific_layer/PKspecific_layer_collective.cpp Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifdef PKGUI_BUILD_COLLECTIVELY
3
#ifdef PKGUI_BUILD_COLLECTIVELY
4
#define PKGUI_IN_COLLECTIVE
4
#define PKGUI_IN_COLLECTIVE
5
#include"composites/PKw_box.cpp"
5
#include "composites/PKw_box.cpp"
6
#include"composites/PKw_composite.cpp"
6
#include "composites/PKw_composite.cpp"
7
#include"composites/PKw_multibox_empty.cpp"
7
#include "composites/PKw_multibox_empty.cpp"
8
#include"composites/PKw_multibox.cpp"
8
#include "composites/PKw_multibox.cpp"
9
#include"composites/PKw_pull_down_menu.cpp"
9
#include "composites/PKw_pull_down_menu.cpp"
10
#include"composites/PKw_slider.cpp"
10
#include "composites/PKw_slider.cpp"
11
#include"composites/PKw_unpositioned_tabbed_view.cpp"
11
#include "composites/PKw_unpositioned_tabbed_view.cpp"
12
#include"decorators/PKdecorator_frame.cpp"
12
#include "decorators/PKdecorator_frame.cpp"
13
#include"decorators/PKdecorator_of_positioned.cpp"
13
#include "decorators/PKdecorator_of_positioned.cpp"
14
#include"decorators/PKdecorator_slider.cpp"
14
#include "decorators/PKdecorator_slider.cpp"
15
#include"decorators/PKdecorator_truncator.cpp"
15
#include "decorators/PKdecorator_truncator.cpp"
16
#include"helpers/PKanchor.cpp"
16
#include "helpers/PKanchor.cpp"
17
#include"helpers/PKpull_down_menu_element.cpp"
17
#include "helpers/PKpull_down_menu_element.cpp"
18
#include"shapes/PKshape_ellipse.cpp"
18
#include "shapes/PKshape_ellipse.cpp"
19
#include"shapes/PKshape_line.cpp"
19
#include "shapes/PKshape_line.cpp"
20
#include"shapes/PKshape_point.cpp"
20
#include "shapes/PKshape_point.cpp"
21
#include"shapes/PKshape_rectangle.cpp"
21
#include "shapes/PKshape_rectangle.cpp"
22
#include"shapes/PKshape.cpp"
22
#include "shapes/PKshape.cpp"
23
#include"widget_components/PKappearance_component.cpp"
23
#include "widget_components/PKappearance_component.cpp"
24
#include"widget_components/PKcaret.cpp"
24
#include "widget_components/PKcaret.cpp"
25
#include"widget_components/PKdiagram.cpp"
25
#include "widget_components/PKdiagram.cpp"
26
#include"widget_components/PKkeypress_handler.cpp"
26
#include "widget_components/PKkeypress_handler.cpp"
27
#include"widget_components/PKlayer_component.cpp"
27
#include "widget_components/PKlayer_component.cpp"
28
#include"widget_components/PKlog_component.cpp"
28
#include "widget_components/PKlog_component.cpp"
29
#include"widget_components/PKmouse_hotkey_interface.cpp"
29
#include "widget_components/PKmouse_hotkey_interface.cpp"
30
#include"widget_components/PKshape_background_of_widget.cpp"
30
#include "widget_components/PKshape_background_of_widget.cpp"
31
#include"widget_components/PKtext_modifier.cpp"
31
#include "widget_components/PKtext_modifier.cpp"
32
#include"widget_components/PKtext_module.cpp"
32
#include "widget_components/PKtext_module.cpp"
33
#include"widgets/PKw_button.cpp"
33
#include "widgets/PKw_button.cpp"
34
#include"widgets/PKw_caption.cpp"
34
#include "widgets/PKw_caption.cpp"
35
#include"widgets/PKw_checkbox.cpp"
35
#include "widgets/PKw_checkbox.cpp"
36
#include"widgets/PKw_described_checkbox.cpp"
36
#include "widgets/PKw_described_checkbox.cpp"
37
#include"widgets/PKw_editbox.cpp"
37
#include "widgets/PKw_editbox.cpp"
38
#include"widgets/PKw_empty_table.cpp"
38
#include "widgets/PKw_empty_table.cpp"
39
#include"widgets/PKw_log.cpp"
39
#include "widgets/PKw_log.cpp"
40
#include"widgets/PKw_progress_bar.cpp"
40
#include "widgets/PKw_progress_bar.cpp"
41
#include"widgets/PKw_tooltip.cpp"
41
#include "widgets/PKw_tooltip.cpp"
42
#include"widgets/PKw_updated_caption.cpp"
42
#include "widgets/PKw_updated_caption.cpp"
43
#include"widgets/PKwidget.cpp"
43
#include "widgets/PKwidget.cpp"
44
#undef PKGUI_IN_COLLECTIVE
44
#undef PKGUI_IN_COLLECTIVE
45
#endif
45
#endif

Updated specific_layer/shapes/PKshape.h Download diff

9899
3
#ifndef SL_PKSHAPE_H_DEFINED
3
#ifndef SL_PKSHAPE_H_DEFINED
4
#define SL_PKSHAPE_H_DEFINED
4
#define SL_PKSHAPE_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    class PKshape:public PKwidget_base
9
    class PKshape:public PKwidget_base

Updated specific_layer/shapes/PKshape_ellipse.h Download diff

9899
3
#ifndef SL_PKSHAPE_ELLIPSE_H_DEFINED
3
#ifndef SL_PKSHAPE_ELLIPSE_H_DEFINED
4
#define SL_PKSHAPE_ELLIPSE_H_DEFINED
4
#define SL_PKSHAPE_ELLIPSE_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKshape.h"
7
#include "PKshape.h"
8
8
9
namespace PKgui
9
namespace PKgui

Updated specific_layer/shapes/PKshape_line.h Download diff

9899
3
#ifndef SL_PKSHAPE_LINE_H_DEFINED
3
#ifndef SL_PKSHAPE_LINE_H_DEFINED
4
#define SL_PKSHAPE_LINE_H_DEFINED
4
#define SL_PKSHAPE_LINE_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKshape.h"
7
#include "PKshape.h"
8
8
9
9

Updated specific_layer/shapes/PKshape_rectangle.h Download diff

9899
3
#ifndef SL_PKRECTANGULAR_FRAME_H_DEFINED
3
#ifndef SL_PKRECTANGULAR_FRAME_H_DEFINED
4
#define SL_PKRECTANGULAR_FRAME_H_DEFINED
4
#define SL_PKRECTANGULAR_FRAME_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKshape.h"
7
#include "PKshape.h"
8
8
9
namespace PKgui
9
namespace PKgui

Updated specific_layer/widget_components/PKappearance_component.h Download diff

9899
3
#ifndef SL_PKAPPEARANCE_COMPONENT_H_DEFINED
3
#ifndef SL_PKAPPEARANCE_COMPONENT_H_DEFINED
4
#define SL_PKAPPEARANCE_COMPONENT_H_DEFINED
4
#define SL_PKAPPEARANCE_COMPONENT_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    class PKappearance_component
9
    class PKappearance_component

Updated specific_layer/widget_components/PKcaret.h Download diff

9899
3
#ifndef SL_PKTEXT_CURSOR_H_DEFINED
3
#ifndef SL_PKTEXT_CURSOR_H_DEFINED
4
#define SL_PKTEXT_CURSOR_H_DEFINED
4
#define SL_PKTEXT_CURSOR_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKtext_modifier.h"
7
#include "PKtext_modifier.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated specific_layer/widget_components/PKdiagram.h Download diff

9899
3
#ifndef LL_PKDIAGRAM_H_DEFINED
3
#ifndef LL_PKDIAGRAM_H_DEFINED
4
#define LL_PKDIAGRAM_H_DEFINED
4
#define LL_PKDIAGRAM_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include"../../geom_2D_lib/PKframe_of_reference.h"
7
#include "../../geom_2D_lib/PKframe_of_reference.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{
10
    ///contains default functions for converting key and value to int and
10
    ///contains default functions for converting key and value to int and

Updated specific_layer/widget_components/PKgraph_drawing_strategy_bars.h Download diff

9899
3
#ifndef SL_PKGRAPH_DRAWING_STRATEGY_BARS_DEFINED
3
#ifndef SL_PKGRAPH_DRAWING_STRATEGY_BARS_DEFINED
4
#define SL_PKGRAPH_DRAWING_STRATEGY_BARS_DEFINED
4
#define SL_PKGRAPH_DRAWING_STRATEGY_BARS_DEFINED
5
5
6
#include"PKdiagram.h"
6
#include "PKdiagram.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
	template<class key,class value,class key_of_map>
9
	template<class key,class value,class key_of_map>

Updated specific_layer/widget_components/PKkeypress_handler.h Download diff

9899
3
#ifndef SL_PKKEYPRESS_HANDLER_H_DEFINED
3
#ifndef SL_PKKEYPRESS_HANDLER_H_DEFINED
4
#define SL_PKKEYPRESS_HANDLER_H_DEFINED
4
#define SL_PKKEYPRESS_HANDLER_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    ///this class is a simple memento that stores current state of a
9
    ///this class is a simple memento that stores current state of a

Updated specific_layer/widget_components/PKlayer_component.cpp Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
4
#include "PKlayer_component.h"
4
#include "PKlayer_component.h"
5
#include"../widgets/PKwidget.h"
5
#include "../widgets/PKwidget.h"
6
namespace PKgui
6
namespace PKgui
7
{
7
{
8
    PKlayer_component::PKlayer_component(PKwidget& owner):
8
    PKlayer_component::PKlayer_component(PKwidget& owner):

Updated specific_layer/widget_components/PKlayer_component.h Download diff

9899
3
#ifndef SL_PKLAYER_COMPONENT_H_DEFINED
3
#ifndef SL_PKLAYER_COMPONENT_H_DEFINED
4
#define SL_PKLAYER_COMPONENT_H_DEFINED
4
#define SL_PKLAYER_COMPONENT_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    ///@brief this class is a layer (submenu) component; it may be used to
9
    ///@brief this class is a layer (submenu) component; it may be used to

Updated specific_layer/widget_components/PKlog_component.cpp Download diff

9899
1
/* This file is under the PKgui License (see License.txt file).
1
/* This file is under the PKgui License (see License.txt file).
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
4
#include"PKlog_component.h"
4
#include "PKlog_component.h"
5
namespace PKgui
5
namespace PKgui
6
{
6
{
7
    class PKlog_component::PKlog_component_impl
7
    class PKlog_component::PKlog_component_impl

Updated specific_layer/widget_components/PKlog_component.h Download diff

9899
3
#ifndef SL_PKLOG_COMPONENT_H_DEFINED
3
#ifndef SL_PKLOG_COMPONENT_H_DEFINED
4
#define SL_PKLOG_COMPONENT_H_DEFINED
4
#define SL_PKLOG_COMPONENT_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    ///todo:
9
    ///todo:

Updated specific_layer/widget_components/PKmouse_hotkey_interface.h Download diff

9899
3
#ifndef ML_WC_PKMOUSE_HOTKEY_INTERFACE_H_DEFINED
3
#ifndef ML_WC_PKMOUSE_HOTKEY_INTERFACE_H_DEFINED
4
#define ML_WC_PKMOUSE_HOTKEY_INTERFACE_H_DEFINED
4
#define ML_WC_PKMOUSE_HOTKEY_INTERFACE_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKkeypress_handler.h"
7
#include "PKkeypress_handler.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated specific_layer/widget_components/PKshape_background_of_widget.cpp Download diff

9899
1
/* This file is under the PKgui License (see License.txt file).
1
/* This file is under the PKgui License (see License.txt file).
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
4
#include"PKshape_background_of_widget.h"
4
#include "PKshape_background_of_widget.h"
5
5
6
namespace PKgui
6
namespace PKgui
7
{
7
{

Updated specific_layer/widget_components/PKshape_background_of_widget.h Download diff

9899
4
#ifndef SL_PKSHAPE_BACKGROUND_OF_WIDGET_H_DEFINED
4
#ifndef SL_PKSHAPE_BACKGROUND_OF_WIDGET_H_DEFINED
5
#define SL_PKSHAPE_BACKGROUND_OF_WIDGET_H_DEFINED
5
#define SL_PKSHAPE_BACKGROUND_OF_WIDGET_H_DEFINED
6
6
7
#include"../../PKbase_layer.h"
7
#include "../../PKbase_layer.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{
10
    ///this is a kind of widget representation that uses a shape drawn
10
    ///this is a kind of widget representation that uses a shape drawn

Updated specific_layer/widget_components/PKtext_log_classes.h Download diff

9899
3
3
4
/* This file is under the PKgui License (see License.txt file).
4
/* This file is under the PKgui License (see License.txt file).
5
Copyright (c) 2009 Piotr Klos */
5
Copyright (c) 2009 Piotr Klos */
6
#include"PKlog_component.h"
6
#include "PKlog_component.h"
7
7
8
///@file
8
///@file
9
///this file contains classes which define the most common way of
9
///this file contains classes which define the most common way of

Updated specific_layer/widget_components/PKtext_modifier.h Download diff

9899
3
#ifndef SL_PKTEXT_MODIFIER_H_DEFINED
3
#ifndef SL_PKTEXT_MODIFIER_H_DEFINED
4
#define SL_PKTEXT_MODIFIER_H_DEFINED
4
#define SL_PKTEXT_MODIFIER_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKcaret.h"
7
#include "PKcaret.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated specific_layer/widget_components/PKtext_module.h Download diff

9899
3
#ifndef SL_PKTEXT_MODULE_H_DEFINED
3
#ifndef SL_PKTEXT_MODULE_H_DEFINED
4
#define SL_PKTEXT_MODULE_H_DEFINED
4
#define SL_PKTEXT_MODULE_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    class PKtext_module
9
    class PKtext_module

Updated specific_layer/widgets/PKw_button.cpp Download diff

9899
352
//    test_PKw_button
352
//    test_PKw_button
353
//        test_PKw_button::instance;
353
//        test_PKw_button::instance;
354
354
355
    test_PKw_button::test_PKw_button():
355
    test_PKw_button::test_PKw_button()
356
        PKtester()
357
    {
356
    {
358
    }
357
    }
359
358
...
...
400
//            PKw_unpositioned_tabbed_view o3(0);
399
//            PKw_unpositioned_tabbed_view o3(0);
401
//            PKTESTER_IS_EQUAL(o3.get_number_of_tabs(),0u);
400
//            PKTESTER_IS_EQUAL(o3.get_number_of_tabs(),0u);
402
//        }
401
//        }
403
        return PKtest_manager::obj.current_test_succesfull();
402
        return PKunit::PKtest_manager::obj.current_test_succesfull();
404
    }
403
    }
405
#endif
404
#endif
406
}
405
}

Updated specific_layer/widgets/PKw_button.h Download diff

9899
4
#define SL_PKWIDGET_BUTTON_H_DEFINED
4
#define SL_PKWIDGET_BUTTON_H_DEFINED
5
5
6
#include "PKw_caption.h"
6
#include "PKw_caption.h"
7
#include"../../PKbase_layer.h"
7
#include "../../PKbase_layer.h"
8
#include "../widget_components/PKmouse_hotkey_interface.h"
8
#include "../widget_components/PKmouse_hotkey_interface.h"
9
#include "../helpers/PKpull_down_menu_element.h"
9
#include "../helpers/PKpull_down_menu_element.h"
10
namespace PKgui
10
namespace PKgui
...
...
229
    }
229
    }
230
230
231
#ifdef PK_DEBUG
231
#ifdef PK_DEBUG
232
    class test_PKw_button:public PKtester
232
    class test_PKw_button:public PKunit::PKtester
233
    {
233
    {
234
      public:
234
      public:
235
        test_PKw_button();
235
        test_PKw_button();

Updated specific_layer/widgets/PKw_caption.h Download diff

9899
3
#ifndef ML_PKWIDGET_CAPTION_H_DEFINED
3
#ifndef ML_PKWIDGET_CAPTION_H_DEFINED
4
#define ML_PKWIDGET_CAPTION_H_DEFINED
4
#define ML_PKWIDGET_CAPTION_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKwidget.h"
7
#include "PKwidget.h"
8
#include "../widget_components/PKtext_module.h"
8
#include "../widget_components/PKtext_module.h"
9
namespace PKgui
9
namespace PKgui

Updated specific_layer/widgets/PKw_checkbox.h Download diff

9899
4
#define SL_PKWIDGET_CHECKBOX_H_DEFINED
4
#define SL_PKWIDGET_CHECKBOX_H_DEFINED
5
5
6
#include "../widget_components/PKmouse_hotkey_interface.h"
6
#include "../widget_components/PKmouse_hotkey_interface.h"
7
#include"../../PKbase_layer.h"
7
#include "../../PKbase_layer.h"
8
#include "PKwidget.h"
8
#include "PKwidget.h"
9
namespace PKgui
9
namespace PKgui
10
{
10
{

Updated specific_layer/widgets/PKw_described_checkbox.h Download diff

9899
4
#define SL_PKWIDGET_DESCRIBED_CHECKBOX_H_DEFINED
4
#define SL_PKWIDGET_DESCRIBED_CHECKBOX_H_DEFINED
5
5
6
#include "PKw_checkbox.h"
6
#include "PKw_checkbox.h"
7
#include"../widget_components/PKtext_module.h"
7
#include "../widget_components/PKtext_module.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{
10
    ///objects of this class are checkboxes with captions;
10
    ///objects of this class are checkboxes with captions;

Updated specific_layer/widgets/PKw_diagram.h Download diff

9899
3
#ifndef SL_PKWIDGET_DIAGRAM_H_DEFINED
3
#ifndef SL_PKWIDGET_DIAGRAM_H_DEFINED
4
#define SL_PKWIDGET_DIAGRAM_H_DEFINED
4
#define SL_PKWIDGET_DIAGRAM_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "../widget_components/PKdiagram.h"
7
#include "../widget_components/PKdiagram.h"
8
namespace PKgui
8
namespace PKgui
9
{
9
{

Updated specific_layer/widgets/PKw_editbox.h Download diff

9899
3
#ifndef SL_PKWIDGET_EDIBOX_H_DEFINED
3
#ifndef SL_PKWIDGET_EDIBOX_H_DEFINED
4
#define SL_PKWIDGET_EDIBOX_H_DEFINED
4
#define SL_PKWIDGET_EDIBOX_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "PKwidget.h"
7
#include "PKwidget.h"
8
#include "../widget_components/PKmouse_hotkey_interface.h"
8
#include "../widget_components/PKmouse_hotkey_interface.h"
9
#include "../widget_components/PKtext_modifier.h"
9
#include "../widget_components/PKtext_modifier.h"

Updated specific_layer/widgets/PKw_empty_table.h Download diff

9899
4
#define SLPKWIDGET_EMPTY_TABLE
4
#define SLPKWIDGET_EMPTY_TABLE
5
5
6
#include "PKwidget.h"
6
#include "PKwidget.h"
7
#include"../../PKbase_layer.h"
7
#include "../../PKbase_layer.h"
8
8
9
//TODO refactoring of PKw_empty_table:
9
//TODO refactoring of PKw_empty_table:
10
//do not store surface, store image pieces instead;
10
//do not store surface, store image pieces instead;

Updated specific_layer/widgets/PKw_log.cpp Download diff

9899
1
/* This file is under the PKgui License (see License.txt file).
1
/* This file is under the PKgui License (see License.txt file).
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
3
#if defined(PKGUI_IN_COLLECTIVE) or not defined(PKGUI_BUILD_COLLECTIVELY)
4
#include"PKw_log.h"
4
#include "PKw_log.h"
5
namespace PKgui
5
namespace PKgui
6
{
6
{
7
    PKw_log::PKw_log(bool _create_defaults):text_pos_rel(2,2)
7
    PKw_log::PKw_log(bool _create_defaults):text_pos_rel(2,2)

Updated specific_layer/widgets/PKw_log.h Download diff

9899
1
#ifndef SL_PKW_LOG_H_DEFINED
1
#ifndef SL_PKW_LOG_H_DEFINED
2
#define SL_PKW_LOG_H_DEFINED
2
#define SL_PKW_LOG_H_DEFINED
3
3
4
#include"PKwidget.h"
4
#include "PKwidget.h"
5
#include"../widget_components/PKlog_component.h"
5
#include "../widget_components/PKlog_component.h"
6
#include"../widget_components/PKtext_log_classes.h"
6
#include "../widget_components/PKtext_log_classes.h"
7
namespace PKgui
7
namespace PKgui
8
{
8
{
9
    class PKw_log:public PKwidget
9
    class PKw_log:public PKwidget

Updated specific_layer/widgets/PKw_progress_bar.h Download diff

9899
2
#define SL_PKWIDGET_PROGRESS_BAR_H_DEFINED
2
#define SL_PKWIDGET_PROGRESS_BAR_H_DEFINED
3
3
4
#include "PKwidget.h"
4
#include "PKwidget.h"
5
#include"../../PKbase_layer.h"
5
#include "../../PKbase_layer.h"
6
namespace PKgui
6
namespace PKgui
7
{
7
{
8
    ///this class provides a simple single-colour or single-surface progress
8
    ///this class provides a simple single-colour or single-surface progress

Updated specific_layer/widgets/PKw_table.h Download diff

9899
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#ifndef SL_PKWIDGET_TABLE_H_DEFINED
3
#ifndef SL_PKWIDGET_TABLE_H_DEFINED
4
#define SL_PKWIDGET_TABLE_H_DEFINED
4
#define SL_PKWIDGET_TABLE_H_DEFINED
5
#include"../../PKbase_layer.h"
5
#include "../../PKbase_layer.h"
6
#include "PKw_empty_table.h"
6
#include "PKw_empty_table.h"
7
    //TODO
7
    //TODO
8
    //zrobic dwie wytyczne:
8
    //zrobic dwie wytyczne:

Updated specific_layer/widgets/PKw_tooltip.h Download diff

9899
3
#ifndef SL_PKWIDGET_TOOLTIP_H_DEFINED
3
#ifndef SL_PKWIDGET_TOOLTIP_H_DEFINED
4
#define SL_PKWIDGET_TOOLTIP_H_DEFINED
4
#define SL_PKWIDGET_TOOLTIP_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include"../widgets/PKwidget.h"
7
#include "../widgets/PKwidget.h"
8
#include"../decorators/PKdecorator_truncator.h"
8
#include "../decorators/PKdecorator_truncator.h"
9
#include"../widget_components/PKtext_module.h"
9
#include "../widget_components/PKtext_module.h"
10
10
11
namespace PKgui
11
namespace PKgui
12
{
12
{

Updated specific_layer/widgets/PKwidget.cpp Download diff

9899
193
    }
193
    }
194
194
195
#ifdef PK_DEBUG
195
#ifdef PK_DEBUG
196
    test_PKwidget::test_PKwidget():
196
    test_PKwidget::test_PKwidget()
197
        PKtester()
198
    {
197
    {
199
    }
198
    }
200
199
...
...
236
                false);
235
                false);
237
            PKTESTER_IS_EQUAL(PKpoint(2,767),rect_position(widg.coord));
236
            PKTESTER_IS_EQUAL(PKpoint(2,767),rect_position(widg.coord));
238
            PKTESTER_IS_EQUAL(PKpoint(20000,22),rect_size(widg.coord));
237
            PKTESTER_IS_EQUAL(PKpoint(20000,22),rect_size(widg.coord));
239
            PKTESTER_IS_EQUAL(widg.appearance.get_color(),create_SDL_Color(0xFF,0xFF,0xAE));
238
            PKTESTER_IS_TRUE(widg.appearance.get_color()==
240
            PKTESTER_IS_EQUAL(widg.appearance.get_frame_color(),create_SDL_Color(0xFF,0x00,0xAE));
239
                create_SDL_Color(0xFF,0xFF,0xAE));
240
            PKTESTER_IS_TRUE(widg.appearance.get_frame_color()==
241
                create_SDL_Color(0xFF,0x00,0xAE));
241
            PKTESTER_IS_EQUAL(true,widg.show);
242
            PKTESTER_IS_EQUAL(true,widg.show);
242
            PKTESTER_IS_EQUAL(false,widg.mouse_in);
243
            PKTESTER_IS_EQUAL(false,widg.mouse_in);
243
            PKTESTER_IS_EQUAL(false,widg.show_frame);
244
            PKTESTER_IS_EQUAL(false,widg.show_frame);
...
...
248
                true);
249
                true);
249
            PKTESTER_IS_EQUAL(PKpoint(0,-767),rect_position(widg2.coord));
250
            PKTESTER_IS_EQUAL(PKpoint(0,-767),rect_position(widg2.coord));
250
            PKTESTER_IS_EQUAL(PKpoint(6,722),rect_size(widg2.coord));
251
            PKTESTER_IS_EQUAL(PKpoint(6,722),rect_size(widg2.coord));
251
            PKTESTER_IS_EQUAL(widg2.appearance.get_color(),create_SDL_Color(0xFF,0xFF,0xAE));
252
            PKTESTER_IS_TRUE(widg2.appearance.get_color()==
252
            PKTESTER_IS_EQUAL(widg2.appearance.get_frame_color(),create_SDL_Color(0xFF,0x00,0xAE));
253
                create_SDL_Color(0xFF,0xFF,0xAE));
254
            PKTESTER_IS_TRUE(widg2.appearance.get_frame_color()==
255
                create_SDL_Color(0xFF,0x00,0xAE));
253
            PKTESTER_IS_EQUAL(false,widg2.show);
256
            PKTESTER_IS_EQUAL(false,widg2.show);
254
            PKTESTER_IS_EQUAL(true,widg2.mouse_in);
257
            PKTESTER_IS_EQUAL(true,widg2.mouse_in);
255
            PKTESTER_IS_EQUAL(true,widg2.show_frame);
258
            PKTESTER_IS_EQUAL(true,widg2.show_frame);
...
...
294
        {
297
        {
295
            PKwidget widg;
298
            PKwidget widg;
296
            widg.set_coord(create_SDL_Rect(0,3,11,89));
299
            widg.set_coord(create_SDL_Rect(0,3,11,89));
297
            PKTESTER_IS_EQUAL(create_SDL_Rect(0,3,11,89),widg.coord);
300
            PKTESTER_IS_TRUE(create_SDL_Rect(0,3,11,89)==widg.coord);
298
            widg.set_coord(create_SDL_Rect(0,-3,115,892));
301
            widg.set_coord(create_SDL_Rect(0,-3,115,892));
299
            PKTESTER_IS_EQUAL(create_SDL_Rect(0,-3,115,892),widg.coord);
302
            PKTESTER_IS_TRUE(create_SDL_Rect(0,-3,115,892)==widg.coord);
300
            widg.set_coord(create_SDL_Rect(52,22,0,0));
303
            widg.set_coord(create_SDL_Rect(52,22,0,0));
301
            PKTESTER_IS_EQUAL(create_SDL_Rect(52,22,0,0),widg.coord);
304
            PKTESTER_IS_TRUE(create_SDL_Rect(52,22,0,0)==widg.coord);
302
            widg.set_coord(create_SDL_Rect(0,0,11,899));
305
            widg.set_coord(create_SDL_Rect(0,0,11,899));
303
            PKTESTER_IS_EQUAL(create_SDL_Rect(0,0,11,899),widg.coord);
306
            PKTESTER_IS_TRUE(create_SDL_Rect(0,0,11,899)==widg.coord);
304
            widg.set_coord(create_SDL_Rect(52,22,32,343));
307
            widg.set_coord(create_SDL_Rect(52,22,32,343));
305
            PKTESTER_IS_EQUAL(create_SDL_Rect(52,22,32,343),widg.coord);
308
            PKTESTER_IS_TRUE(create_SDL_Rect(52,22,32,343)==widg.coord);
306
            widg.set_coord(create_SDL_Rect(0,0,11,19));
309
            widg.set_coord(create_SDL_Rect(0,0,11,19));
307
            PKTESTER_IS_EQUAL(create_SDL_Rect(0,0,11,19),widg.coord);
310
            PKTESTER_IS_TRUE(create_SDL_Rect(0,0,11,19)==widg.coord);
308
            widg.set_coord(create_SDL_Rect(52,0,111,89));
311
            widg.set_coord(create_SDL_Rect(52,0,111,89));
309
            PKTESTER_IS_EQUAL(create_SDL_Rect(52,0,111,89),widg.coord);
312
            PKTESTER_IS_TRUE(create_SDL_Rect(52,0,111,89)==widg.coord);
310
            widg.set_coord(create_SDL_Rect(-52,0,11,849));
313
            widg.set_coord(create_SDL_Rect(-52,0,11,849));
311
            PKTESTER_IS_EQUAL(create_SDL_Rect(-52,0,11,849),widg.coord);
314
            PKTESTER_IS_TRUE(create_SDL_Rect(-52,0,11,849)==widg.coord);
312
            widg.set_coord(create_SDL_Rect(52,22,161,89));
315
            widg.set_coord(create_SDL_Rect(52,22,161,89));
313
            PKTESTER_IS_EQUAL(create_SDL_Rect(52,22,161,89),widg.coord);
316
            PKTESTER_IS_TRUE(create_SDL_Rect(52,22,161,89)==widg.coord);
314
            widg.set_coord(create_SDL_Rect(-52,-22,11,80));
317
            widg.set_coord(create_SDL_Rect(-52,-22,11,80));
315
            PKTESTER_IS_EQUAL(create_SDL_Rect(-52,-22,11,80),widg.coord);
318
            PKTESTER_IS_TRUE(create_SDL_Rect(-52,-22,11,80)==widg.coord);
316
            widg.set_coord(create_SDL_Rect(52,22,0,33));
319
            widg.set_coord(create_SDL_Rect(52,22,0,33));
317
            PKTESTER_IS_EQUAL(create_SDL_Rect(52,22,0,33),widg.coord);
320
            PKTESTER_IS_TRUE(create_SDL_Rect(52,22,0,33)==widg.coord);
318
        }
321
        }
319
        {
322
        {
320
            PKwidget widg;
323
            PKwidget widg;
...
...
429
            ///with negative coordinates is impossible because the
432
            ///with negative coordinates is impossible because the
430
            ///SDL_MouseMotionEvent does not allow negative coordinates;
433
            ///SDL_MouseMotionEvent does not allow negative coordinates;
431
        }
434
        }
432
        return PKtest_manager::obj.current_test_succesfull();
435
        return PKunit::PKtest_manager::obj.current_test_succesfull();
433
    }
436
    }
434
#endif
437
#endif
435
}
438
}

Updated specific_layer/widgets/PKwidget.h Download diff

9899
3
#ifndef ML_PKWINDOW_H_DEFINED
3
#ifndef ML_PKWINDOW_H_DEFINED
4
#define ML_PKWINDOW_H_DEFINED
4
#define ML_PKWINDOW_H_DEFINED
5
5
6
#include"../../PKbase_layer.h"
6
#include "../../PKbase_layer.h"
7
#include "../decorators/PKdecorator_of_positioned.h"
7
#include "../decorators/PKdecorator_of_positioned.h"
8
#include "../widget_components/PKappearance_component.h"
8
#include "../widget_components/PKappearance_component.h"
9
namespace PKgui
9
namespace PKgui
...
...
380
    inline PKwidget::~PKwidget()
380
    inline PKwidget::~PKwidget()
381
        {}
381
        {}
382
#ifdef PK_DEBUG
382
#ifdef PK_DEBUG
383
    class test_PKwidget:public PKtester
383
    class test_PKwidget:public PKunit::PKtester
384
    {
384
    {
385
      public:
385
      public:
386
        test_PKwidget();
386
        test_PKwidget();

Updated widget_log_demo.cpp Download diff

9899
1
/* This file is under the PKgui License (see License.txt file).
1
/* This file is under the PKgui License (see License.txt file).
2
Copyright (c) 2009 Piotr Klos */
2
Copyright (c) 2009 Piotr Klos */
3
#include"widget_log_demo.h"
3
#include "widget_log_demo.h"
4
4
5
widget_log_demo::widget_log_demo(widget_data& _data):
5
widget_log_demo::widget_log_demo(widget_data& _data):
6
    data(_data),
6
    data(_data),