Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/commandhandler/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 3 kB image not shown  

Quelle  ControllerCommand.h

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef mozilla_ControllerCommand_h_
#define mozilla_ControllerCommand_h_

#include "mozilla/Attributes.h"
#include "nsISupportsImpl.h"
#include "nsStringFwd.h"
class nsISupports;
class nsICommandParams;

namespace mozilla {

class ControllerCommand {
  NS_INLINE_DECL_REFCOUNTING(ControllerCommand);

  /**
   * Returns true if the command is currently enabled. An nsIControllerCommand
   * can implement more than one commands; say, a group of related commands
   * (e.g. delete left/delete right). Because of this, the command name is
   * passed to each method.
   *
   * @param aCommandName  the name of the command for which we want the enabled
   *                      state.
   * @param aCommandContext    a cookie held by the nsIControllerCommandTable,
   *                  allowing the command to get some context information.
   *                  The contents of this cookie are implementation-defined.
   */

  virtual bool IsCommandEnabled(const nsACString& aCommandName,
                                nsISupports* aCommandContext) = 0;
  virtual void GetCommandStateParams(const nsACString& aCommandName,
                                     nsICommandParams*,
                                     nsISupports* aCommandContext) = 0;

  /**
   * Execute the name command.
   *
   * @param aCommandName  the name of the command to execute.
   *
   * @param aCommandParams the command parameters or null.
   * @param aCommandContext    a cookie held by the nsIControllerCommandTable,
   *                  allowing the command to get some context information.
   *                  The contents of this cookie are implementation-defined.
   */

  MOZ_CAN_RUN_SCRIPT
  virtual nsresult DoCommand(const nsACString& aCommandName,
                             nsICommandParams* aParams,
                             nsISupports* aCommandContext) = 0;

 protected:
  virtual ~ControllerCommand() = default;
};

#define DECL_CONTROLLER_COMMAND                                          \
  bool IsCommandEnabled(const nsACString&, nsISupports*) override;       \
  void GetCommandStateParams(const nsACString&, nsICommandParams*,       \
                             nsISupports*) override;                     \
  MOZ_CAN_RUN_SCRIPT                                                     \
  nsresult DoCommand(const nsACString&, nsICommandParams*, nsISupports*) \
      override;

#define DECL_CONTROLLER_COMMAND_NO_PARAMS                                \
  bool IsCommandEnabled(const nsACString&, nsISupports*) override;       \
  void GetCommandStateParams(const nsACString&, nsICommandParams*,       \
                             nsISupports*) override {}                   \
  MOZ_CAN_RUN_SCRIPT                                                     \
  nsresult DoCommand(const nsACString&, nsICommandParams*, nsISupports*) \
      override;

}  // namespace mozilla

#endif

Messung V0.5 in Prozent
C=92 H=95 G=93

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.