<commit_before>#ifndef oxygencomboboxengine_h
#define oxygencomboboxengine_h
/*
* this file is part of the oxygen gtk engine
* Copyright (c) 2010 <NAME> <<EMAIL>>
*
* based on the Null Theme Engine for Gtk+.
* Copyright (c) 2008 <NAME>
*
* This  library is free  software; you can  redistribute it and/or
* modify it  under  the terms  of the  GNU Lesser  General  Public
* License  as published  by the Free  Software  Foundation; either
* version 2 of the License, or(at your option ) any later version.
*
* This library is distributed  in the hope that it will be useful,
* but  WITHOUT ANY WARRANTY; without even  the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License  along  with  this library;  if not,  write to  the Free
* Software Foundation, Inc., 51  Franklin St, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#include "oxygenbaseengine.h"
#include "oxygendatamap.h"
#include "oxygencomboboxdata.h"

#include <gtk/gtkwidget.h>

namespace Oxygen
{
    //! forward declaration
    class Animations;

    //! stores data associated to editable comboboxes
    /*!
    ensures that the text entry and the button of editable comboboxes
    gets hovered and focus flags at the same time
    */
    class ComboBoxEngine: public BaseEngine
    {

        public:

        //! constructor
        ComboBoxEngine( Animations* parent ):
            BaseEngine( parent )
            {}

        //! destructor
        virtual ~ComboBoxEngine( void )
        {}

        //! register widget
        void registerWidget( GtkWidget* widget )
        {
            if( _data.contains( widget ) ) return;
            _data.registerWidget( widget );
            BaseEngine::registerWidget( widget );
        }

        //! unregister widget
        void unregisterWidget( GtkWidget* widget )
        { _data.erase( widget ); }

        //!@name modifiers
        //@{

        //! assign button to data matching parent
        void setButton( GtkWidget* parent, GtkWidget* value )
        { _data.value( parent ).setButton( value ); }

        //! assign entry to data matching parent
        void setEntry( GtkWidget* parent, GtkWidget* value )
        { _data.value( parent ).setEntry( value ); }

        //! button focus<commit_msg>added contains method.<commit_after>#ifndef oxygencomboboxengine_h
#define oxygencomboboxengine_h
/*
* this file is part of the oxygen gtk engine
* Copyright (c) 2010 <NAME> <<EMAIL>>
*
* based on the Null Theme Engine for Gtk+.
* Copyright (c) 2008 <NAME>
*
* This  library is free  software; you can  redistribute it and/or
* modify it  under  the terms  of the  GNU Lesser  General  Public
* License  as published  by the Free  Software  Foundation; either
* version 2 of the License, or(at your option ) any later version.
*
* This library is distributed  in the hope that it will be useful,
* but  WITHOUT ANY WARRANTY; without even  the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License  along  with  this library;  if not,  write to  the Free
* Software Foundation, Inc., 51  Franklin St, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#include "oxygenbaseengine.h"
#include "oxygendatamap.h"
#include "oxygencomboboxdata.h"

#include <gtk/gtkwidget.h>

namespace Oxygen
{
    //! forward declaration
    class Animations;

    //! stores data associated to editable comboboxes
    /*!
    ensures that the text entry and the button of editable comboboxes
    gets hovered and focus flags at the same time
    */
    class ComboBoxEngine: public BaseEngine
    {

        public:

        //! constructor
        ComboBoxEngine( Animations* parent ):
            BaseEngine( parent )
            {}

        //! destructor
        virtual ~ComboBoxEngine( void )
        {}

        //! register widget
        void registerWidget( GtkWidget* widget )
        {
            if( _data.contains( widget ) ) return;
            _data.registerWidget( widget );
            BaseEngine::registerWidget( widget );
        }

        //! unregister widget
        void unregisterWidget( GtkWidget* widget )
        { _data.erase( widget ); }

        //! true if widget is included
        bool contains( GtkWidget* widget ) const
        { return _data.contains( widget ); }

        //!@name modifiers
        //@{

        //! assign button to data matching parent
        void setButton( GtkWidget* parent, GtkWidget* value )
        { _data.value( parent ).setButton( value ); }

        //! assign entry to data matching parent
        void setEntry( GtkWidget* parent, GtkWidget* value )
        { _data.value( parent ).setEntry( value ); }

        //! button focus
{'fraction_non_alphanumeric': 0.08247213779128673, 'fraction_numerical': 0.008105369807497468, 'mean_word_length': 2.535816618911175, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3000281', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1314, 'n_words': 530}