<commit_before>/*
 * mCtrl: Additional Win32 controls
 * <https://github.com/mity/mctrl>
 * <https://mctrl.org>
 *
 * Copyright (c) 2012-2020 <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.1 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef MCTRL_EXPAND_H
#define MCTRL_EXPAND_H

#include <mCtrl/_defs.h>
#include <mCtrl/_common.h>

#ifdef __cplusplus
extern "C" {
#endif


/**
 * @file
 * @brief Expand control (@c MC_WC_EXPAND).
 *
 * The expand control is a utility control used to toggle size of another window
 * between &quot;collapsed&quot; and &quot;expanded&quot; states.
 *
 * In addition, when collapsing, the control automatically disables and hides
 * all child windows of the managed window which fall out of the visible area;
 * and when expanding it enables and shows all the child windows revealed by the
 * resize operation. Application can disable this behavior with the style
 * @ref MC_EXS_IGNORECHILDREN.
 *
 *
 * @section Managed Window
 *
 * By default the managed window is a parent window of the control. Use message
 * @c CCM_SETNOTIFYWINDOW to change what window the control manages.
 *
 * @note The root control also gets all the notifications from the control.
 *
 *
 * @section Expanded and Collapsed Sizes
 *
 * If both width and height the of the expanded and/or collapsed sizes is zero,
 * the control computes automatically from analyzes of position and size of
 * all child windows of the managed window (usually the parent).
 *
 * The width of the managed window is kept unchanged in this automatic regime.
 * The height of the managed window is calculated so that all child windows
 * of the managed window are visible (the expanded state) or all child windows
 * positioned below the expand control itself are hidden (the collapsed state).
 *
 * If you use style @ref MC_EXS_CACHESIZES, the computed sizes are retained
 * for next use, i.e. the sizes are computed only once.
 *
 * You can set expanded and collapsed sizes explicitly with message
 * @ref MC_EXM_SETCOLLAPSEDSIZE and @ref MC_EXM_SETEXPANDEDSIZE respectively.
 *
 *
 * @section Initial State
 *
 * After creation of the control, its logical state is collapsed. Though
 * the control does not resize the dialog because it may not be already fully
 * initialized, e.g. if the expand control is not last control created in the
 * dialog.
 *
 * Therefore it is supposed that application explicitly sends the message
 * @ref MC_EXM_EXPAND after the dialog and all its children are created,
 * usually as part of the @c WM_INITDIALOG handling.
 *
 *
 * These standard messages are handled by the control:
 * - @c WM_GETFONT
 * - @c WM_SETFONT
 * - @c WM_SETREDRAW
 * - @c CCM_SETNOTIFYWINDOW
 *
 * These standard notifications are sent by the control:
 * - @c NM_OUTOFMEMORY
 * - @c NM_RELEASEDCAPTURE
 */


/**
 * @name Initialization Functions
 */
/*@{*/

/**
 * Registers window class of the control.
 * @return @c TRUE on success, @c FALSE on failure.
 */
BOOL MCTRL_API mcExpand_Initialize(void);

/**
 * Unregisters window class of the control.
 */
void MCTRL_API mcExpand_Terminate(void);


/**<commit_msg>Expand: Add missing doxygen block end.<commit_after>/*
 * mCtrl: Additional Win32 controls
 * <https://github.com/mity/mctrl>
 * <https://mctrl.org>
 *
 * Copyright (c) 2012-2020 <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.1 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef MCTRL_EXPAND_H
#define MCTRL_EXPAND_H

#include <mCtrl/_defs.h>
#include <mCtrl/_common.h>

#ifdef __cplusplus
extern "C" {
#endif


/**
 * @file
 * @brief Expand control (@c MC_WC_EXPAND).
 *
 * The expand control is a utility control used to toggle size of another window
 * between &quot;collapsed&quot; and &quot;expanded&quot; states.
 *
 * In addition, when collapsing, the control automatically disables and hides
 * all child windows of the managed window which fall out of the visible area;
 * and when expanding it enables and shows all the child windows revealed by the
 * resize operation. Application can disable this behavior with the style
 * @ref MC_EXS_IGNORECHILDREN.
 *
 *
 * @section Managed Window
 *
 * By default the managed window is a parent window of the control. Use message
 * @c CCM_SETNOTIFYWINDOW to change what window the control manages.
 *
 * @note The root control also gets all the notifications from the control.
 *
 *
 * @section Expanded and Collapsed Sizes
 *
 * If both width and height the of the expanded and/or collapsed sizes is zero,
 * the control computes automatically from analyzes of position and size of
 * all child windows of the managed window (usually the parent).
 *
 * The width of the managed window is kept unchanged in this automatic regime.
 * The height of the managed window is calculated so that all child windows
 * of the managed window are visible (the expanded state) or all child windows
 * positioned below the expand control itself are hidden (the collapsed state).
 *
 * If you use style @ref MC_EXS_CACHESIZES, the computed sizes are retained
 * for next use, i.e. the sizes are computed only once.
 *
 * You can set expanded and collapsed sizes explicitly with message
 * @ref MC_EXM_SETCOLLAPSEDSIZE and @ref MC_EXM_SETEXPANDEDSIZE respectively.
 *
 *
 * @section Initial State
 *
 * After creation of the control, its logical state is collapsed. Though
 * the control does not resize the dialog because it may not be already fully
 * initialized, e.g. if the expand control is not last control created in the
 * dialog.
 *
 * Therefore it is supposed that application explicitly sends the message
 * @ref MC_EXM_EXPAND after the dialog and all its children are created,
 * usually as part of the @c WM_INITDIALOG handling.
 *
 *
 * These standard messages are handled by the control:
 * - @c WM_GETFONT
 * - @c WM_SETFONT
 * - @c WM_SETREDRAW
 * - @c CCM_SETNOTIFYWINDOW
 *
 * These standard notifications are sent by the control:
 * - @c NM_OUTOFMEMORY
 * - @c NM_RELEASEDCAPTURE
 */


/**
 * @name Initialization Functions
 */
/*@{*/

/**
 * Registers window class of the control.
 * @return @c TRUE on success, @c FALSE on failure.
 */
BOOL MCTRL_API mcExpand_Initialize(void);

/**
 * Unregisters window class of the control.
 */
void MCTRL_API mcExpand_Terminate(void);

/*@}*/


/**
{'fraction_non_alphanumeric': 0.07068442568904128, 'fraction_numerical': 0.006066200712119214, 'mean_word_length': 3.8709055876685934, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, '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': '2061102', 'n_tokens_mistral': 2147, 'n_tokens_neox': 2069, 'n_words': 1023}