This file is indexed.

/usr/include/wxsmith/wxwidgets/wxwidgetsgui.h is in libwxsmithlib-dev 16.01+dfsg-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* This file is part of wxSmith plugin for Code::Blocks Studio
* Copyright (C) 2006-2007  Bartlomiej Swiecki
*
* wxSmith is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wxSmith 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with wxSmith. If not, see <http://www.gnu.org/licenses/>.
*
* $Revision: 8251 $
* $Id: wxwidgetsgui.h 8251 2012-08-28 02:31:00Z ollydbg $
* $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-16.xx/src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsgui.h $
*/

#ifndef WXWIDGETSGUI_H
#define WXWIDGETSGUI_H

#include "../wxsgui.h"
#include "../wxscodinglang.h"

/** \brief Class responsible for operations on wxWidgets-based projects */
class wxWidgetsGUI : public wxsGUI
{
    DECLARE_CLASS(wxWidgetsGUI)
    public:
        /** \brief Ctor */
        wxWidgetsGUI(wxsProject* Project);

        /** \brief Dctor */
        virtual ~wxWidgetsGUI();

        /** \brief Getting coding language of application's source */
        inline wxsCodingLang GetLanguage() { return m_AppLanguage; }

        /** \brief Setting new coding language for application's source */
        inline void SetLanguage(wxsCodingLang Language) { m_AppLanguage = Language; }

        /** \brief Getting application source file */
        inline const wxString& GetAppSourceFile() { return m_AppFile; }

        /** \brief Setting new application source file
         *  \note remember to call RebuildApplicationCode to regenerate sources
         *  \note This function will also set valid language according to file's extension
         */
        void SetAppSourceFile(const wxString& NewAppFile);

        /** \brief Getting array of loaded resources */
        inline wxArrayString& GetLoadedResources() { return m_LoadedResources; }

        /** \brief Getting main resource name */
        inline const wxString& GetMainResourceName() { return m_MainResource; }

        /** \brief Setting new main resource
         *  \note remember to call RebuildApplicationCode to regenerate sources
         */
        inline void SetMainResourceName(const wxString& Resource) { m_MainResource = Resource; }

        /** \brief Getting Some Initialization config */
        inline void GetInitParams(bool& CallInitAll,bool& CallInitAllNecessary) { CallInitAll = m_CallInitAll; CallInitAllNecessary = m_CallInitAllNecessary; }

        /** \brief Setting initialization config */
        inline void SetInitParams(bool CallInitAll=true,bool CallInitAllNecessary=true) { m_CallInitAll=CallInitAll; m_CallInitAllNecessary = CallInitAllNecessary; }

    private:

        virtual cbConfigurationPanel* OnBuildConfigurationPanel(wxWindow* Parent);
        virtual void OnRebuildApplicationCode();
        virtual bool OnCheckIfApplicationManaged();
        virtual bool OnCreateApplicationBinding();
        virtual void OnReadConfig(TiXmlElement* element);
        virtual void OnWriteConfig(TiXmlElement* element);

        /** \brief Checking if file with given name has source code prepared to be managed by wxSmith */
        bool IsAppSourceManaged(const wxString& FileName,wxsCodingLang Lang);

        /** \brief Checking if given project file can be adopted to wxSmith */
        bool ScanForApp(ProjectFile* File);

        /** \brief Adding smith bindings to given file */
        bool AddSmithToApp(const wxString& RelativeFileName,wxsCodingLang Lang);

        /** \brief Creating new file with application class */
        bool CreateNewApp(const wxString& FileName);

        /** \brief Getting name of class used inside IMPLEMENT_APP() macro call */
        wxString GetAppClassName(const wxString& Source,wxsCodingLang Lang);

        /** \brief Enumerating all resources in project which could be set as main resource in wxWidgets */
        void EnumerateMainResources(wxArrayString& Names);

        /* Some helper functions used while scanning source files */
        static inline bool IsWhite(wxChar Ch);
        static inline bool IsWhite(const wxString& Str,int Pos);
        static inline bool Match(const wxString& Str,int Pos,wxChar Ch);

        wxString m_AppFile;               ///< \brief Source file defining application
        wxArrayString m_LoadedResources;  ///< \brief List of automatically loaded resource files
        wxString m_MainResource;          ///< \brief Resource used by default
        bool m_CallInitAll;               ///< \brief True if wxXmlResource::Get()->InitAllHandlers() should be called while initialization
        bool m_CallInitAllNecessary;      ///< \brief True if should call wxXmlResource::Get()->InitAllHandlers() only when necessary
        wxsCodingLang m_AppLanguage;      ///< \brief Coding language for main app file

        friend class wxWidgetsGUIConfigPanel;
        friend class wxWidgetsGUIAppAdoptingDlg;
};

#endif